How to implement prototype ajax in php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mohit_Prog
Forum Commoner
Posts: 26
Joined: Mon Apr 23, 2007 6:10 am

How to implement prototype ajax in php?

Post 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.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

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