jquery ajax get function

preview_player
Показать описание
Link for all dot net and sql server video tutorial playlists

Link for slides, code samples and text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.

In this video we will discuss
1. How to make a GET request using jQuery AJAX get function
2. Difference between jQuery get and load functions

We discussed how to make AJAX requests using jQuery load() function in Part 53 and Part 54. Let us rewrite the example we worked with in Part 54, using jQuery AJAX get() function.

AS SHOWN BELOW

$('#' + helpDiv + 'HelpDiv').html(response);
});

What is the difference between jQuery get and load functions
1. jQuery load function can be used to load only the HTML data from the server, where as jquery get function can be used to load any type of data (xml, json, script, or html).

2. jQuery load function may issue a get or post request depending on whether the data parameter is specified or not. POST method is used if data is provided, otherwise, GET is used. On the other hand jquery get method always issues a GET request.

3. With load function we specify a selector first. The HTML content retrieved from the server is automatically inserted into the DOM elements matched by the selector.
$('selector').load('url', 'data');

With get function we do not specify any selector first, instead we will make use of the callback function to insert the data received from the server into the DOM elements.

$.get('url', 'data', function (response) {
$('selector').html(response);
});

In our next video, we will discuss how to load json data from the server using jquery get function.
Рекомендации по теме
Комментарии
Автор

Sir Can you please inform approx how many parts a complete tutorial will be at the start itself. Also what are possible series you are planning next. Any how these videos are of highest quality.

Shaipasi
Автор

Uncaught TypeError: $.get is not a function
this is the error what i am getting

ajaykumarkushwaha
Автор

Just a minor note. The spelling on first name is wrong. The author wrote "fisrt" instead of first.

isaacmihaeli