Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

jQuery / Prototype bugs in IE

Posted on 2007-11-16
3
Medium Priority
?
474 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 1000 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

730 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