Menu

#1 patch for getForm

open
nobody
None
5
2006-08-23
2006-08-23
aprisobal
No

In function "XMLHTTP.prototype.getForm =
function(formid)" replace from
"var formobj = document.getElementById(formid);"
to:
"if (typeof formid != 'object') {
var formobj = document.
getElementById(formid);
} else {
var formobj = formid;
}"
This will be very useful when using so handler, for
example:
<!--...-->
<script>
function someajaxhandler(form) {
formVars = ajaxObj.getForm(form);
ajaxObj.call("ajax=1"+formVars, ajaxResponse);
return false;
}
</script>
<!--...-->
<form name="someform" onSubmit="return
someajaxhandler(this);">
<!--...-->

Thank you!
Good Luck!
Apri

Discussion


Log in to post a comment.

MongoDB Logo MongoDB