954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

image as link

I want to make an image as link, such that when I click on the image a javascript function is called. The whole code is written in javascript. I try this byt it files: aaa=document.createElement('a'); aaa.href="#"; aaa.innerHTML="downArrow.gif"; aaa.onclick=function() { moreInfo(this); } here I want when I click "doenArrow.gif" image the function "moreInfo()" should be called.

mohammed2raja
Light Poster
30 posts since Sep 2008
Reputation Points: 10
Solved Threads: 2
 

put this

<img src="downArrow.gif">


in

<a href...></a>


and then use onclick function.....

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You