xajax: submit form

by prettyscripts on 2008-04-10 12:00:48

ajaxxajax

the function to get form values to submit is xajax.getFormValues().

to submit the form via click of a button:

Code:

<input type="submit" value="Submit"
    onClick="xajax_function(xajax.getFormValues('formname'));" />

to submit part of the form, name the selected fields with the same prefix:

Code:

<input type="submit" value="Submit"
    onClick="xajax_function(xajax.getFormValues('formname', 1, 'prefix'));" />

the second parameter is boolean indicating submitting disabled fields.

the full syntax for the function:

xajax.getFormValues(formID[,bSubmitDisabled[, prefix]]

reference of this post: here.

Tags: form, submit, xajax

1 comment

Comment by Richard @ 2011-04-01 02:12:19
****-
thanks for the info, I didn't remember this

Leave a comment


Your email address will not be revealed on this site.
PoorExcellent
note: all comments are moderated. do not spam and do not advertise. only comments relevant to the post will be published.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)