Click to See Complete Forum and Search --> : How do I turn this form button info into just a link
shakyfry
August 25th, 2007, 07:33 PM
<FORM name="USERFAVOUR" method="post" action="{$baseurl}/my_favour.php">
<input type="hidden" name="rvid" value="{$answers[i].VID}">
<input type="submit" name="removfavour" value="Remove Favorite"> </FORM>
It is calling on my_favour.php to remove something.
Please help.
Thank you.
Dr. Script
August 25th, 2007, 09:10 PM
If you want it to be just a link, simply remove the hidden element, and voila. You'll have to change {$baseurl} to reflect the actual URL you want though, or have that done on the server if you know what you are doing.
However, if you want a link, a physical anchor is always preferred to a button for accessibility reasons.
andreasblixt
August 27th, 2007, 02:32 AM
As a link, your form would be represented like this:
<a href="{$baseurl}/my_favour.php?rvid={$answers[i].VID}">Remove Favorite</a>
Note that the method will have changed from POST to GET.
Waqas_Badar
August 28th, 2007, 02:49 AM
it think you can use submit function of form. Consider following code:
<a href="javascript: document.forms['USERFAVOUR'].submit()">Submit</a>
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.