You are here: Re: Process form with both Javascript and PHP « PHP Programming Language « IT news, forums, messages
Re: Process form with both Javascript and PHP

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация