Re: anchor inside form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-08-25 at 00:55 -0700, leledumbo wrote:
> 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>
> -- 
> View this message in context: http://www.nabble.com/anchor-inside-form-tp25129981p25129981.html
> Sent from the PHP - General mailing list archive at Nabble.com.
> 
> 
You can only send the form from a link (an anchor is a named point in a
page that also uses the <a> tag) using Javascript. Most people will tell
you this is a bad idea, as you are then relying on the end user to both
have Javascript available _and_ have it switched on (and that they are
not sitting behind a corporate firewall that strips out Javascript which
some do apparently)

Why not just use another submit button? If you don't like the look of a
regular submit, then use an <input type="image"/> button instead, as
these act like submit buttons for the most part. You can have as many
submit buttons on a form that you like, and if you give them unique
names, you will know which one has been clicked.

Thanks,
Ash
http://www.ashleysheridan.co.uk




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux