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="<img src="downArrow.gif">";
        aaa.onclick=function()
        {
            moreInfo(this);
        }

here I want when I click "doenArrow.gif" image the function moreInfo() should be called.

put this

<img src="downArrow.gif">

in

<a href...></a>

and then use onclick function.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.