469,361 Members | 2,264 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

onclick text call for javascript

Hello.
I have this line
<input type="image" src="linktoimage.gif" border="0" onClick="javascript: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
Jan 24 '08 #1
3 1583
Amzul
130 100+
u want a link ?
Expand|Select|Wrap|Line Numbers
  1. <a href="#" onclick="javascript:bla()">click here!</a>
Jan 25 '08 #2
PERFECT! It work perfectly. Thank you so much.
Jan 25 '08 #3
acoder
16,027 Expert Mod 8TB
u want a link ?
Expand|Select|Wrap|Line Numbers
  1. <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.
Jan 25 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Sarah | last post: by
2 posts views Thread by kelvin | last post: by
2 posts views Thread by giant food | last post: by
5 posts views Thread by moondaddy | last post: by
2 posts views Thread by Peter | last post: by
5 posts views Thread by Stuart Shay | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.