bkeithm
asked on
Anchor tag question
I have a form with two input fields and 5 anchored GIFs for buttons. Each GIF will send me to a different URL. I want to transfer the data within the fields in the first screen to the new URL when I press the GIF button. How can I accomplish this?
even better than <a href="#"...> would be to use <a href="javascript:void()".. .> because it won't jump to the top of the page when you click it...
... that is why I return false in the onClick -- so that it won't jump. Therefore, '#' is no worse than 'javascript:void();' or even 'javascript:;'
I did not know that! You learn something new everyday, huh? Thanks for the new knowledge, knightEknight =)
Yep! That is the purpose of returning true or false from an anchor. You could even use href='cnn.com' and as long as you return false, you will never actually go to cnn.com . It also allows you to do things like this:
<A href='www.cnn.com' onClick='return(confirm("A re you sure?"));'>Click Me!</a>
<A href='www.cnn.com' onClick='return(confirm("A
ASKER
Thanks knightEknight. The points are yours. Sorry about the tardiness of the acceptance. I've been out-ot-pocket for a few days.
Glad to help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<A href='#' onClick='document.myform.a
<A href='#' onClick='document.myform.a
<A href='#' onClick='document.myform.a
etc
__________________________