Reputation: 39
My code i have set cache :false still in IE it runs only once . Please help me.
<script type="text/javascript" src="javascripts/jq1.7.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#butn").click(function(){
var txt1 = $("#txt1").val();
$.ajax({
type: "Post",
url: "jqueryphp.php",
dataType: "html",
data: "txt1="+txt1,
cache: false,
success: function(result) {
$("div").html(result);
}
});
});
});
</script>
</head>
<body>
<form>
<input type="text" id="txt1" /><br />
<input type="button" id="butn">
</form>
Please help me with this i am stuck here. It runs properly on every browser except IE
Upvotes: 0
Views: 287
Reputation: 57
Make sure the file making the call has a proper doctype and xmlns declaration.
Assign a xmlns id to the elements that are involved in the call
example:
also use: jQuery.post('call.php',{ action: "get"}
find the full tutorial here: http://vavumi.com/?p=257
Upvotes: 0
Reputation: 100175
Try something like:
$.ajaxSetup({
cache: "false"
});
$.ajax({
type: "POST",
url: "jqueryphp.php",
data: "txt1="+txt1,
cache: false,
success: function(result){
$("div").html(result);
}
});
Hope it helps
Upvotes: 1
Reputation: 2948
IE is cache greedy. Considering adding a timestamp to each URL. Here are some other options too. http://formatinternet.wordpress.com/2010/01/14/ie-cache-for-ajax-requests/
Upvotes: 0