Page 1 of 1

How to implement prototype ajax in php?

Posted: Mon Apr 23, 2007 7:19 am
by Mohit_Prog
I have implemented prototype ajax for various form elements in PHP.
But problem is "How can I check for a form submit event with a prototype AJAX?"
I mean on form's onSubmit event by according to few conditions we should make a call for ajax.
So if anyone has an idea plz put some light on this.Its urgent.

Thanking you.

Posted: Mon Apr 23, 2007 7:36 am
by CoderGoblin
Simply putting a javascript onsubmit="return ajaxcall();" on the form should work where the javascript function ajaxcall returns false if form is not to be submitted. You also need to bear in mind of what happens when someone does not have javascript enabled...