[ale] OT: XMLHTTP + IE

Christopher Fowler cfowler at outpostsentinel.com
Thu Dec 14 18:04:38 EST 2006


Maybe I've found something...

I can get it to call alarm_check.pl but only when I set the system clock
ahead by a few years?  

I need to add some more alert()'s to see where we stop in the code.

On Thu, 2006-12-14 at 17:05 -0500, Christopher Fowler wrote:
> I saw the article in LJ 11/06 in regards to AJAX + Caller ID.  I decided
> to use the code to test and idea that I had with our system.  I wrote a
> simple CGI program that will get the last key out of a row in a database
> table.  The java script will use that key to check to see when a new row
> is inserted.  When a new row exists it will automatically refresh the
> page.
> 
> This works great in Netscape but fails to work in IE
> 
> Here is where I'm having a problem:
> 
> function get_from_server() {
>   var req;
> 
>   if(window.XMLHttpRequest) {
>     req = new XMLHttpRequest();
>   } else if(window.ActiveXObject) {
>     req = new ActiveXObject("Microsoft.XMLHTTP");
>   }
> 
> 
>   if(req != null) {
>     req.open("GET", "/SC/Test/alarm_check.pl", false);
>     req.send(null);
>   } else {
>     alert("Your browser does not support XMLHTTP!");
>   }
>   return req;
> 
> }
> 
> 
> It appears that the alarm_check.pl program is never called.  I've got
> the program dumping to a log file when it is executed and I see that log
> file updated every 2 seconds when I access this page in netscape.  In
> Windows I see nothing.  I've used alert() to validate that we are
> getting to that part of the code so I know req.open() is getting called.
> But nothing is happening.  Apache log files also show no attempt by IE
> to "GET" the alarm_check.pl program.  No JS error messages in IE either.
> 
> The JS code is at:  http://buford.linxdev.com/Alarm.js  Maybe someone
> here knows of something I should have done.
> 
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale




More information about the Ale mailing list