This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » development » Feature requests » form + javascript
form + javascript [message #75684] Thu, 26 March 2009 17:55 Go to next message
igharbi  is currently offline igharbi
Messages: 6
Registered: March 2009
Junior Member

i want to know how to submit a form with javascript ( i use jqueery)?
Re: form + javascript [message #99762 is a reply to message #75684 ] Tue, 25 May 2010 13:31 Go to previous message
simply_jhen  is currently offline simply_jhen
Messages: 1
Registered: May 2010
Junior Member
Yes, you can use jquery. The paramters are the following:

  • URL - the path of a file which the request will be sent
  • data - data you wish to send ex. $("#formID").serialize() - where all the elements inside the form will be sent
  • success - (data, textStatus, XMLHttpRequest) A callback function that is executed if the request succeeds.
  • dataType - The type of data expected from the server. ex. json, xml

$.post('test.php', function(data) {
	//you can do something in here
    $('.result').html(data.message);// Set the HTML contents (data.message) of each element in the set of matched elements.
}, 'json');

Previous Topic:Feature request: i18n extract strings from form classes
Next Topic:Save State (hide/show) of Debug Toolbar
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software