Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ajax get html response

//your jquery code will be like this:
$.ajax({
      type: 'POST',
      url: $url,
      data: new FormData(this),
      dataType: 'json',
      contentType: false,
      processData:false,//this is a must
      success: function(response){ 
      		$('your_selector').html(response);
      }
});

//php code will be like this
echo '<div>some html code</div>';
die();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ajax #html #response
ADD COMMENT
Topic
Name
5+3 =