Hello
i have written following code, it works fine, with calling all the before, success, complete functions without any problems it does post to the correct php file too..
but the only problem i have is returned response text (var html) null (it comes out blank) can somebody pls help me …
php file is outputing fine and get variables are post successfully only the return is not working i use “echo $html” in the php file
/////////////////////////////////////////////////////////////
<script type=”text/javascript” language=”javascript1.5″ type=”text/javascript”>
$(document).ready(function(){
});
function loadPage(c, pid) {
$.ajax({
type: “GET”,
dataType: “html”,
url: “http://www.bestwebdesigners.com.au/detail/RLinks.php”,
data: “c=”+c+”&pid=”+pid,
timeout: 5000,
beforeSend: function() {
//alert(“before”);
$(“#loading”).fadeIn(‘slow’, function() {
});
$(“#links”).remove();
//document.getElementById(“links”).style.display = “none”;
//document.getElementById(“loading”).style.display = “inline”;
},
error: function() {
alert(“error”);
alert(this.url);
},
success: function(html) {
//alert(“success”);
alert(html);
$(“#loading”).fadeOut(‘slow’, function() {
});
$(“#linksRes”).html(“<h1>love me for a reason </h1>”);
//document.getElementById(“loading”).style.display = “none”;
//document.getElementById(“links”).style.display = “inline”;
//document.getElementById(‘links’).innerHTML = response;
},
complete: function() {
// document.getElementById(“loading”).style.display = “none”;
//alert(“complete”);
}
});
}
/**/
</script>