Michelob
2008-Feb-25 21:33 UTC
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, visit:
http://catalog.minnair.com:9080/storefrontB2BWEB/Navigation/AjaxRequestErrorExample/AjaxRequestErrorExample.html
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:
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
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
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 clues. If there is other info that could be of
use to solve this, please let me know. I feel like I''m 99% there.
This is torture!
:)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---