Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-25-2008, 08:07 PM   PM User | #1
mjmetzger
New to the CF scene

 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mjmetzger is an unknown quantity at this point
Internet Explorer Prototype - Ajax.Request works in FF, IE throws Error Message: Unknow runtime Error

I have a script that works perfectly in firefox and does not work in IE. I put together a 28 second screen recording that describes my problem better than I ever could. To view this video, click here.

I've used similar scripts with a different URL that have worked in IE in the past (i posted a hello world version yesterday). As the video shows, this does not work in IE; Only Firefox. IE throws an exception name:Error message:Unknown runtime error. WTF? I'm lost.

Here's the javascript.
Code:
function ItemToolTip(itmId, elmId){
  // NOTE: Inserts the Loading image
  $(elmId).innerHTML='<img text-align="center" ' 
			+ 'src="/storefrontB2BWEB/images/Loading.gif" />'
  //build url
  var url='/storefrontB2BWEB/itemdetail.do?action=prepare_detail&itm_id=' + itmId; 
  new Ajax.Request(
	url, {	
		method: 'get', 
		encoding: 'ISO-8859-1', 
		onSuccess: function(transport) {
		    //This fires and works properly in Firefox only.
		    $(elmId).innerHTML=transport.responseText;
 	               //Other code omitted because IE Never gets here.
		},
		onException: function(transport,e){
		    //This fires only in IE! 
                             //What is the exception? How does one correct it?
		    $(elmId).innerHTML=$(elmId).innerHTML 
			+ '<b>Request Failed</b><br />error name: ' 
			+ e.name 
			+ '<br />error message: ' 
			+ e.message;
		}			
	}
  );
}
Because I can get it working in FF, I can see the Request and Response info. I'm not sure why FF would handle this properly and IE would not...

GET http://catalog.minnair.com:9080/stor...il&itm_id=6966

Response Headers
Quote:
Content-Type text/html; charset=ISO-8859-1
Content-Language en-US
Transfer-Encoding chunked
Date Mon, 25 Feb 2008 19:20:05 GMT
Server WebSphere Application Server/6.0
Request Headers
Quote:
Host catalog.minnair.com:9080
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept text/javascript, text/html, application/xml, text/xml, */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
X-Requested-With XMLHttpRequest
X-Prototype-Version 1.6.0.2
Referer http://catalog.minnair.com:9080/stor...94&itm_index=0
Cookie JSESSIONID=0000Z9hwyp5_ff-22MaDrW7kPLV:-1
I'm just grasping for breadcrumbs. If there is other info that could be of use to solve this, please let me know.

Last edited by mjmetzger; 02-25-2008 at 09:00 PM.. Reason: added a link to a video showing my problem in action.
mjmetzger is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:10 AM.


Advertisement
Log in to turn off these ads.