jQuery: $.post error with IE
Posted: Mon Mar 16, 2009 3:32 am
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hi,
I'm having problems with IE and jQuery.
I would get data by $.post and with Firefox it works, but doesn't with Internet Explorer.
I think is a problem of callback function because with Firefox prompts SUCCESS but with IE prompts ERROR.
Any ideas?
My code:
script.js
readFeed.php
index.php
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hi,
I'm having problems with IE and jQuery.
I would get data by $.post and with Firefox it works, but doesn't with Internet Explorer.
I think is a problem of callback function because with Firefox prompts SUCCESS but with IE prompts ERROR.
Any ideas?
My code:
script.js
Code: Select all
function readFeed(id){
var lid='';
var fe='';
$.ajax({
url: 'readFeed.php',
type: 'POST',
dataType: 'text',
timeout: 1000,
error: function() {
alert('Error.');
},
success: function(dt){
alert('Sucsess: '+data);
}
});
alert('End.');
return;
}
Code: Select all
<?php
echo "die";
return;
?>
Code: Select all
...
<tr class="source">
<td id="source-$id">
<div id="feed-$id" style="display:none;">-feed-</div>
</td>
<td>
<a href="javascript:void 200;" onClick="readFeed($id);" >Leggi</a>
</td>
</tr>
...
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: