[jQuery] AJAX Request
[jQuery] AJAX Request
Hi.
I have just setup a basic site where you click the link and jQuery
retrieves the link via ajax. Code as follows:
<script type="text/javascript">
function fetchURL(obj){
var page_address = obj.href;
$.ajax{(
url: page_address,
type: "GET",
dataType: "html",
error: function(e){
alert("An Error has occured" + e);
},
success: function(data){
$("#returned_data").empty();
$("#returned_data").append(data);
}
});
return false;
}
</script>
<a href="about.php" onclick="fetchURL(this); return false;">About</a>
This script works fine with Firefox 2 and Firefox 3 Beta 2. However,
as soon as you use Internet Explorer it all goes wrong and you get a
blank screen.
Does anyone know why this may be?
Notes:
I am using the latest version of Jquery
Internet Explorer version 7 (Latest Available)
Thanks.
Alex
http://www.ajtrichards.co.uk