Log in

View Full Version : Anchor for a image



satkannanab
07-21-2008, 04:22 AM
Hi.
i need to display a anchot symbol when a user takes his cursor over the image.
Since the image doesn't have a link at all.
I already have a code as below.but its not working.


<A><img src="images/next.gif" onclick="mypopup();" alt="Available resources" ></A>


regards,
satheeshkannan

Nile
07-21-2008, 05:24 AM
1) If you want it to display the anchor symbol when the client takes there mouse over the image, you'd have to change the highlighted(below), to onmouseover.


<A><img src="images/next.gif" onclick="mypopup();" alt="Available resources" ></A>

2) You'd also have to show us the source of mypopup() in the javascript.

satkannanab
07-21-2008, 05:34 AM
<A><img src="images/next.gif" onmouseover="mypopup();" alt="Available resources" ></A>


I have changed the above code as u told.But if mouse moved over the image itself am getting a popup.Not getting an anchor symbol also.


You'd also have to show us the source of mypopup() in the javascript.

I cant get the solution for this.
If i click an image i need a popup window at the same time if a mouse moved over an image i need a anchor symbol.How i can acheive it.

Thanks in advance
satheesh kannan.

Nile
07-21-2008, 05:37 AM
Ok, then add two attributes. Please take a look at a basic javascript tutorial. It will tell you how to make pop ups, and/or anything else you need.

satkannanab
07-21-2008, 05:43 AM
Thanks for ur kind reply.
Basically am a java programmer.New to java script.
I learned javascript a basics only.I cant find a right page for the point u told above.
can u get a sample code for the requirement or send me a link to learn the javascript to full fill my requirement.Suggest me a logic.

Regards,
satheesh kannan

Nile
07-21-2008, 02:05 PM
Here's a javbascript event handler tutorial:
http://www.javascriptkit.com/javatutors/event1.shtml
And then you can learn about pop ups here:
http://www.quackit.com/javascript/popup_windows.cfm