PHP Classes

form_ajax_submit fix

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  form_ajax_submit fix  >  (Un) Subscribe thread alerts  
Subject:form_ajax_submit fix
Summary:small fix in form_ajax_submit validate form before submit
Messages:4
Author:kiril botev
Date:2007-05-23 11:01:07
Update:2007-05-25 21:57:48
 

  1. form_ajax_submit fix   Reply   Report abuse  
Picture of kiril botev kiril botev - 2007-05-23 11:01:07
...
Function GetJavascriptConnectionAction
...
$javascript = "if(!ValidateForm(document.getElementsByName('".$form->NAME."')[0])) return false; .....

  2. Re: form_ajax_submit fix   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-05-23 21:32:28 - In reply to message 1 from kiril botev
I am not sure what you mean.

The validation is triggered by calling the form object onsubmit function.

  3. Re: form_ajax_submit fix   Reply   Report abuse  
Picture of kiril botev kiril botev - 2007-05-25 20:47:42 - In reply to message 2 from Manuel Lemos
hi,
i'm very interested of youres classes. I try to send form information with AJAX but the form was not validated and i add this /if(!ValidateForm(document.getElementsByName('".$form->NAME."')[0])) return false;/

Function GetJavascriptConnectionAction
...
$javascript = "if(!ValidateForm(document.getElementsByName('".$form->NAME."')[0])) return false; .....

to validate form before to send to server. May be error is mine but i cant find a way to validate my form information before to send by AJAX to server




  4. Re: form_ajax_submit fix   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-05-25 21:57:48 - In reply to message 3 from kiril botev
Now that you mentioned it, I went to check and realized that a bug was introduced in the last release.

I just fixed the bug and you may download the fixed version from the CVS repository here:

meta-language.net/cvs/~checkout~/fo ...

Thank you for reporting.