JS "onclick" stops the given button from being passed to CGI
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Jul 1 22:20:55 UTC 2009
Madison Kelly wrote:
> Matthew Godycki wrote:
>>> Hi all,
>>> I've added an 'onclick' event to an HTML form button, and now the
>>> value set in the button is not being passed to/picked up by my
>>> script. This is a problem because how I process the script depends on
>>> what button the user pressed.
>>> Anyone run into this before? Any idea how to get around it? Removing the
>>> 'onclick' function solves the problem, but I need the function, so... :)
>> Don't forget to make sure the script for the onclick event has a
>> return value. Ie,
>> 'return true', etc.
> In case it makes a difference, the button is an '<input type="image" ...>".
> <input type="image" name="rescan" id="rescan" value="true" alt="Rescan"
> onclick="lockOnSubmit('line_info', 'rescan');" onMouseOver="stm(...)"
Found the problem... I disable the button to prevent multiple submits,
but of course, this disables returning it's value. *sigh*.
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy