Hello Friends,
i want to call a webpage from jQuery and add the content to it to a div.
The downloaded data should not undergo any parsing, it should be in raw format.
I try to integrate the another application to my website.
I've done some experimenting and the code does a successful request, but
there seems there is no result displayed properly.
<html>
<head>
</head>
<h1>Whisper</h1>
<div id="result"></div>
<h3>Output</h3>
<div id="output"></div>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery.cookie.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
type: "GET",
// dataType: "script",
url: 'http://somesite.com/ajax/chat.php?&test=1&l=1&tt=1',
//data: "",
beforeSend: function(){
// alert( "sending " );
},
error: function( request,error ){
alert("error: " + error + " " + request );
},
success: function(data, textStatus, XMLHttpRequest) {
$("#output").html( "output: " + data + "." );
$("#result").html( "ok " + data +" "+ textStatus +" "+ XMLHttpRequest);
return false;
}
});
});
</script>
</html>
Since the output will not be HTML, it should be displayed without processing.