Solved

jQuery / Prototype bugs in IE

Posted on 2007-11-16
3
461 Views
Last Modified: 2013-11-05
I use jQuery 1.2.1 and Prototype 1.5.1 libraries for some effects when deleting records from the database.  I have noticed it does not return the second callback response for all versions of IE - 5, 6 & 7 so i do not get my last effect occuring...

This is a bug or am I doing something wrong?  I have tested the script on a number of other browsers and it all works fine...so i guess it is an issue with Micro$lop browser - IE...

See my code below:
function removeRow(eid,mid) {
	var myAjax = new Ajax.Request("delete-email-alert.jsp?eid=" + eid, {
		method:'get',
		onSuccess: function(callback) {
			var object = new Ajax.Request("count-email-alerts.jsp?mid=" + mid, {
				method:'get',
				onSuccess: function(callback) {
					if(callback.responseText == 0) {
						$("#"+eid).fadeOut("slow", function() {
							$(this).html("<div class=\"col-empty\">All email alerts have now been deleted!</div>").fadeIn("slow");
						});
					} else {
						$("#"+eid).fadeOut("slow").slideUp();
					}
				}
			});
		}
	});
}

Open in new window

0
Comment
Question by:ellandrd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
gops1 earned 250 total points
ID: 20297754
It is because of IE browser caching all responses from XMLHTTPRequest:

referf this place, it mentions the solution for this:

http://en.wikipedia.org/wiki/Xmlhttp#Microsoft_Internet_Explorer_cache_issues
0
 
LVL 18

Assisted Solution

by:Morcalavin
Morcalavin earned 250 total points
ID: 20297769
This issue can occurr with other browsers as well.  I use a Math.random() or Date() to make the urls' unique:

"delete-email-alert.jsp?eid=" + eid + "&cache=" + Math.random()

Open in new window

0
 
LVL 16

Author Comment

by:ellandrd
ID: 20297850
Cheers guys - i was unaware of the caching issue in IE...

Works perfect now.

Ellandrd
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
modify change color of text 9 50
Horizontal Full Calendar using php 5 42
Different Javascript on iPhone than Win 10 desktop? 7 54
Sticking text to shapes in Raphael.js 6 41
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question