Web Analytics Made Easy -
StatCounter How to onclick on a hyperlink ? - CodingForum

Announcement

Collapse
No announcement yet.

How to onclick on a hyperlink ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to onclick on a hyperlink ?

    Hi !

    I have a working code that sets a cookie and execute the full() function, when the user clicks on an image.

    How can I obtain the same onclick= effect when clicking on a hyperlink that is simple text?

    document.write('<img src="'+b+'" vspace="5" hspace="5" border="1" alt="" onclick="setCookie(\'imgnum\',getImageNum(this)); full(\'showpic.htm\');"/>');


    Thanks in advance!
    Richard

  • #2
    document.write('<a href="showpic.htm" onclick="setCookie(\'imgnum\',getImageNum(this)); full(\'showpic.htm\');return false">Show Picture</a>');
    Glenn
    vBulletin Mods That Rock!

    Comment

    Working...
    X