Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

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 12-13-2008, 01:48 AM   PM User | #1
rahulpatel
New to the CF scene

 
Join Date: Dec 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rahulpatel is an unknown quantity at this point
IE Issues.

I think the problem I have is with the javascript I have. My site works terrific in FF and chrome but stops dead with IE7. Problem for me is it has to work in IE.

Code:
var url = "insertIE.php?id="; // The server-side script
       function handleHttpResponse() {   
        if (http.readyState == 4) {
              if(http.status==200) {
                  var results=http.responseText;
              document.getElementById('poll').innerHTML = results;
              }
              }
        }		   
		   
        function requestCustomerInfo() {     
            var sId = document.getElementById("txtCustomerId").value;
            http.open("GET", url + escape(sId), true);
            http.onreadystatechange = handleHttpResponse;
            http.send(null);
        }
function getHTTPObject() {
  var xmlhttp;

  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject){
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    if (!xmlhttp){
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
   
}
  return xmlhttp;
 
}
var http = getHTTPObject(); // We create the HTTP Object
There's probably a million and one reasons why it doesn't work but I cannot figure it out. There is only so much left hair that I can pull out before I'm completely bald.

Anybody care to hazard a guess as to why it doesn't work with IE. (Please don't say "Don't use IE!", if I had a pound for every time.....)
rahulpatel is offline   Reply With Quote
Old 12-13-2008, 03:03 AM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
"It doesn't work" really does not tell us what the issue is.

Have you debugged with alerts to see where it is stopping. Have you used a proxy such as Fiddler to see if the call makes it out and back. DO you get error message?

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 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 06:19 AM.


Advertisement
Log in to turn off these ads.