Top add

jQuery’s serialize method?

All elements are retrieved in standard URL retrieval  method. Jquery has a option to serialize all the post values that are sent in form action.

Example :

<form action="#" id="input_form">
First name: <input name="first_name" type="text" />
Last name: <input name="last_name" type="text" />
Email: <input name="email" type="text" />
<input name="submit" type="submit" value="send" />
</form>

All the values that are submitted are retrieved using the jquery function $(this).serialize();

eg: var query_srting = $(this).serialize();

Now query_string has first_name=value&last_name=value&email=value

Note : Please use urldecode (PHP function) to correctly decode the post values

1 comment:

Anonymous said...

Search is one of the most important part of any website. Here I will show a few practical techniques for designing search forms and a few tricks to make usable and good-looking search functionality. seo company