JS "onclick" stops the given button from being passed to CGI

Matthew Godycki mcg2-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Wed Jul 1 21:31:44 UTC 2009




> 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.

Cheers,
-M

--
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 mailing list