jquery quick ajax primer

In the past I have shown you how to do a quick ajax call to update a html element on the page using prototype.

Here is a similar example but using jquery ( for all you who use jquery over prototype ).

[code]
function superButtonClick() {
$('#id_of_the_element').load(
'/backend_page.php?the_variable_name=the_variable_value'
);
}
[/code]

It is pretty simple to use the load function on any element. There are a few other jquery ajax functions that are useful when wanting to do a post or handle return data; perhaps we will discuss these type of jquery calls in the future.

Comments

Be the first to leave a comment on this post.

Leave a comment

To leave a comment, please log in / sign up