Answers for "jquery ajax get parameters"

7

jquery ajax get

$.ajax({
    	url: "www.site.com/page",
    	success: function(data){ 
    	    $('#data').text(data);
    	},
    	error: function(){
    		alert("There was an error.");
    	}
    });
Posted by: Guest on March-28-2020
0

make ajax request post jquery

$.ajax({
  method: "POST",
  url: "some.php",
  data: { name: "John", location: "Boston" }
})
Posted by: Guest on July-21-2020
1

ajax get request parameters

$.ajax({
    url: "ajax.aspx?ajaxid=4&UserID=" + UserID + "&EmailAddress=" + encodeURIComponent(EmailAddress),
    success: function(response) {
        //Do Something
    },
    error: function(xhr) {
        //Do Something to handle error
    }
});
Posted by: Guest on March-02-2021
0

how to get the status of other urls in ajax

$('#main-menu a').on('click', function(event) {
  event.preventDefault();

  $.ajax(this.href, {
    success: function(data) {
      $('#main').html($(data).find('#main *'));
      $('#notification-bar').text('The page has been successfully loaded');
},
    error: function() {
      $('#notification-bar').text('An error occurred');
    }
  });
});
Posted by: Guest on May-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language