I am using AJAX to call a PHP script. The PHP echo back a complete HTML table. How can I display this table as a HTML page ?
Displaying AJAX Response
Collapse
X
-
Tags: None
-
You must have a target element where you want to display the output from your ajax. like this.
Make sure that the id or class of your element where you want to display is existing.Code:$.ajax({ type: "post", url: "URL", data:{ fielddata : "fielddata" }, success: function(datafromphp) { $("#elementToDisplay").html(datafromphp); } });
Comment