RE: [OT - JS] onsubmit state

2005-05-11 Thread Ewok
VALUE of the button in the var 'btn' inside the function to do whatever you want with. -Original Message- From: Dave Merrill [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 5:32 PM To: CF-Talk Subject: RE: [OT - JS] onsubmit state The point is that regardless of what

Re: [OT - JS] onsubmit state

2005-05-11 Thread Ryan Sabir
In the onClick handler for the button, you can refer to the 'this' object, or pass it to a function. 'this' will always refer to the button that was clicked. Can't do the same with onSubmit though. Maybe you could set a javascript variable using the 'this' object on the onClick, and pick up that v

RE: [OT - JS] onsubmit state

2005-05-11 Thread Dave Merrill
The point is that regardless of what btn was clicked, its value hasn't "taken effect" yet during onclick or onsubmit. How does giving them different names help? Dave Merrill > Without knowing what exactly you're using it for, I'd say give the submit > buttons different names rather than values

RE: [OT - JS] onsubmit state

2005-05-11 Thread Ewok
Without knowing what exactly you're using it for, I'd say give the submit buttons different names rather than values -Original Message- From: Dave Merrill [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 4:58 PM To: CF-Talk Subject: [OT - JS] onsubmit state Say you've got a form w

RE: [OT - JS] onsubmit state

2005-05-11 Thread Dave Merrill
Typo in the PECULIAR ASIDE. It would normally be: form.form_action[0].value not: form.form_action.value[0] Doh! Don't want to distract my own thread here, but what's still peculiar is that form.form_action.value = "whatever" (without the [0]) has the desired effect, e