Results 1 to 6 of 6

Thread: Anchor for a image

  1. #1
    Join Date
    Jul 2008
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Anchor for a image

    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.
    HTML Code:
    <A><img src="images/next.gif" onclick="mypopup();" alt="Available resources" ></A>
    regards,
    satheeshkannan

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    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.
    Code:
    <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.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jul 2008
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Code:
    <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.
    Code:
    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.

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    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.
    Jeremy | jfein.net

  5. #5
    Join Date
    Jul 2008
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    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
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •