Skip to main content
Inspiring
May 9, 2008
Question

Two anchor tags on cffom

  • May 9, 2008
  • 1 reply
  • 590 views
Here is part of my cfform

<td colspan="2">

<input type="text" name="supplier_number" id="supplier_number" value="">

<a href="supplier_number_lookup.cfm?urdn_number=#qryGet_Activity.urdn_number#">

<img src="../images/magnifying_glass.gif">
<a href="javascript:void(0);" onmouseover="return overlib('Click here to search for a supplier number.', FGCOLOR, '#DCDEE0');" onmouseout="return nd();">
</a>

There is an input tag. Think a url link that will go to the next page if the magnifying glass icon is clicked. Howerver, there is some java popu that should also display when the mouse is over the magnifying glass, but it does not work. can I have two </a> tags, one when you click on the magnifying glass to go to the link and one when you hover over the magnifying glass to dispalythe popup message ?

I tried to move the </a> around but it seems to only work for one and not both.

Do I have the </a> in the wrong place, or how can I do this ?
    This topic has been closed for replies.

    1 reply

    Inspiring
    May 10, 2008
    why on earth do you need to anchor tags??? you can't nest them, btw.

    just move your image and the onmouseover event from your second <a> to
    the first one.

    <a href="..." onmouseover="return overlib('Click here to search for a
    supplier number.', FGCOLOR, '#DCDEE0');" onmouseout="return nd();">
    <img src="../images/magnifying_glass.gif">
    </a>


    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/
    trojnfnAuthor
    Inspiring
    May 10, 2008
    I moved the anchor tag, and here is my code :

    <td colspan="2">
    <input type="text" name="supplier_number" id="supplier_number" value="">  
    <cfoutput>
    <a href="supplier_number_lookup.cfm?ref_number=#qry.ref_number#">
    </cfoutput>
    <a href="javascript:void(0);" onmouseover="return overlib('Click here to search for a supplier number.', FGCOLOR, '#DCDEE0');" onmouseout="return nd();">
    <img src="../images/lookup.gif">
    </a>

    When I move the mouse over the image, the hover help message popups, but when I click on the image, it does not call the link to go to the supplier_number_lookup.cfm page.

    If I switch it, the hover help will not display but the link will go to the page.

    What am I doing wrong and how can I fix it so that the icon does both a hover help and link to the next page ?