|
Posted by d on 10/06/42 11:39
<mouac01@yahoo.com> wrote in message
news:1139420865.358411.160610@g43g2000cwa.googlegroups.com...
> Thanks for the reply, Dave. I think I tried that before and it didn't
> work. I'll try it again. However, what if I have multiple submit
> buttons. The javascript above validates when the Login button is
> clicked. What if I have a Quit button as well that calls a different
> javascript function. I don't see how the onsubmit event can
> distinquish between two different functions when each button is
> clicked. That's why I used the onclick event so I can assign a
> javascript function to each button. I assume PHP doesn't care which
> event I use to call the javascript functions since PHP is server side?
> But just so long as the form is submitted. Thanks.... Chong
What does the quit button do?
You can have each button assign a value to a hidden input in your form -
called, say, "action", then call the submit() method of the form
(document.getElementById("form_id").submit()). That will definitely be
picked up by any functions looking at the form after said value has been
assigned.
dave
Navigation:
[Reply to this message]
|