Using the Post Function - Course Introduction to jQuery UI - Part 21 | web Developer courses
This video discusses the post function. We will use it to post data to the server. The parameters we will be passing are the name of the page, the ID, and the callback function.
You didn't like the quality of this content?
Would you like to comment what you didn't like?
Duration: 19:47 minutes
Summary: This video discusses the post function. We will use it to post data to the server. The parameters we will be passing are the name of the page, the ID, and the callback function. So when the user clicks a button on the page, the click event is triggered and the post function is called. We will be calling Record.aspx. This page is expecting an id in the request object. We will create a json object that contains that id, serialize it and return it to the user. On the client side, we will retrieve the data in the json object and display it on the screen. Although the post function is handy to make these types of calls, you will end up using the ajax function if you need more flexibility with the call. Behind the scene post uses ajax. To illustrate this, we will build the same call using the ajax function. The ajax function takes a large set of parameters that ranges from the type, to the url and data (there is a long list of these parameters on the jQuery web site). After making the ajax call, we will call the done function to retrieve the data and display it on the page. Obviously, we will have the same result as the post call.
Technologies and Resources: jQuery, jqGrid, Visual Studio 2010, Ajax, function, div, click, function, html, button, $.post, $.ajax.