onclick text call for javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webaddict
    New Member
    • Jan 2008
    • 2

    onclick text call for javascript

    Hello.
    I have this line
    <input type="image" src="linktoimag e.gif" border="0" onClick="javasc ript:return EJEJC_frm(this. parentNode);">

    I want to simply replace image with a line of text so that when the user clicks the text phrase such as Click Me To Add and it calls for the javascript above.

    Any ideas?
    Thanks
  • Amzul
    New Member
    • Oct 2007
    • 130

    #2
    u want a link ?
    Code:
    <a href="#" onclick="javascript:bla()">click here!</a>

    Comment

    • webaddict
      New Member
      • Jan 2008
      • 2

      #3
      PERFECT! It work perfectly. Thank you so much.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by Amzul
        u want a link ?
        Code:
        <a href="#" onclick="javascript:bla()">click here!</a>
        There's no need for "javascript :" in an onclick. You may also want to put a return false to prevent the link being followed.

        Comment

        Working...