Hello,
Is there an alternative to .load() in jQuery.
Thanks Jean
Hello,
Is there an alternative to .load() in jQuery.
Thanks Jean
Please increase your acceptance rate. Its too low. .ajax() is an alternative. Can you state the purpose for which you want to use an alternative?
Yes, you can use $.ajax() directly if you need additional control over what .load() offers.
There are also other $.ajax() shorthand methods available.
As has been mentioned you can use $.ajax() directly.
Here is an example of this.
function update_user_ajx(user_id){
var data = {
username: $('#UsernamePost_' + user_id).val(),
password: $('#PasswordPost_' + user_id).val(),
email: $('#EmailPost_' + user_id).val(),
accesslevel: $('#AccessLevelPost_' + user_id).val()
};
$.ajax({
url: "/managesettings/updateuser/" + user_id,
type: "POST",
data: data,
cache: false,
success: function (html) {
/* Replace Content */
$('#UpdateUsers').html(html);
/* Try Fade In */
$('#UpdateUsers').fadeIn('slow');
}
});
}