JQuery Post Simplified

JQuery POST In Simple Steps



Here is the most simplified JQuery POST Script with much fewer lines

Step 1 

Include JQuery

<script src=”http://code.jquery.com/jquery-1.9.1.js“></script>

Step 2 

Create your form Here is sample

<form method=”post” action=”data_post.php”>
<input name=”cust_id” id=”cust_id” type=”text” />
<input name=”name” id=”name” type=”text” />
<input name=”Button1″ id=”button1″ type=”button” value=”button” />

Here the form is posting to data_post.php but we need to do it again in the script , keep reading…

Step 3

Now the Script Part

alert(“Data: ” + data + “\nStatus: ” + status);

Here what we do is calling a function on button click


And Next is POST , here we are Passing the entire fields which are necessary in data_post.php to process


This will Post cust_id and name to data_post.php where we can access those by $_POST[‘cust_id’] and $_POST[‘name’]


abhilash, is a programmer by profession and a technology addict with a passion towards browsing , shopping and imaging . My views may be biased on reviews. all images and videos are copyrighted to respective owners.

Add comment

Your Header Sidebar area is currently empty. Hurry up and add some widgets.