Debugging in IE is possible, though not nearly as seemless as in Firefox.
Go to Tools -> Options and then the Advanced tab. Ensure that the "Disable
Script Debugging (Internet Explorer)" checkbox is unchecked. You can
download the script debugger if don't have it installed. You can get t
here (requires validation):
http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en
The 2 links below may help:
http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html
http://www.codestore.net/store.nsf/unid/DOMT-5UBUVW?OpenDocument
Thanks,
Todd
"Bob P. Roche"
<BRoche@packaging
corp.com> To
Sent by: web400@xxxxxxxxxxxx
web400-bounces@mi cc
drange.com
Subject
[WEB400] AJAX issue in IE
2008-12-31 10:30
Please respond to
Web Enabling the
AS400 / iSeries
<web400@midrange.
com>
I am trying my first AJAX code. I copied most of the JavaScript from a
January 2008 article by Aaron Bartell. I was able to duplicate his code in
a test program and it worked. I am now trying to make one drop down
selection update another drop down box. My problem is I used Firefox for
debugging my JavaScript, looking for typos extra quotes that sort of
thing. Now it works properly in Firefox (though my html has another issue
there). My problem is I need it to work in IE, It's for internal company
use and that's the browser on everyone's desktop. In IE when I select in
the first drop down the second goes blank. It is updating, but it's not
getting any data. I don't know anyway to debug in IE, Trial and error is
getting really annoying.
The screen is generated using CGIDEV2. and so is the response being sent
back the browser. I do add the heading to the data sent back in the ajax
response. I am just returning html, no XML to build a new set of options
for the <select> grouping.
JavaScript I am using.
<script type="text/javascript">
// setup needed for ajax on diferent browsers
var http = crtReqObj();
function crtReqObj() {
var reqObj;
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
reqObj = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
reqObj = new ActiveXObject("Microsoft.XMLHTTP");
}
return reqObj;
}
// get data from billto and update shipto. Use billto as new
default shipto value
function updDropDown(fldName) {
var fld = document.getElementById(fldName);
http.open('get',
'
http://lake:1104/cgi-bro/SYG930?DDMODE=S&DDVIEWNAME=CB01HP&DDFLDNAME=BTCD&DDSELCODE=&DDVARNAME=&DDDEFAULT='
+
fld.value);
http.onreadystatechange = ItmResponse;
http.send(null);
}
function ItmResponse() {
if(http.readyState == 4 && http.status == 200){
var response = http.responseText;
if(response == ' '){
document.getElementById("shipto").innerHTML='No matching Ship to found';
} else{
document.getElementById("shipto").innerHTML=response;
}
}
}
</script>
As an Amazon Associate we earn from qualifying purchases.