RE: [PHP] anchor inside form
| From: | Arno Kuhl | Date: | Tue, 25 Aug 2009 10:28:59 +0000 |
| Subject: | RE: [PHP] anchor inside form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297177@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: leledumbo [mailto:leledumbo_cool@yahoo.co.id]
Sent: 25 August 2009 09:55 AM
To: php-general@lists.php.net
Subject: [PHP] anchor inside form
If I have an anchor inside form, how can I send form using the anchor
without displaying target url? I've tried the code below but IE says that
this.form is null or empty and Firefox does nothing.
<form action="somewhere.php" method="get">
# Pick me
</form>
--
You can use javascript behind a button or image or link to submit the form
from anywhere in your html page. You don't need the anchor but you do need a
form name. Something like:
href="javascript:document.FormName.submit();"
Cheers
Arno