473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

AJAX works in IE7 but not FF2

60
Below is the script I used on my site, works fine on IE but not on FF.

the project i working on is www.forwardpage.com, i'm adding ajax on this test page http://www.forwardpage.com/test/user.asp?id=alan. copy the link to see what i meant. nothing shows up in FF, not even an error.

Expand|Select|Wrap|Line Numbers
  1. var xmlHttp;
  2.     try{ // Firefox, Opera 8.0+, Safari
  3.       xmlHttp=new XMLHttpRequest();
  4.     }
  5.     catch (e){
  6.         try{ // Internet Explorer
  7.             xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  8.         }
  9.         catch (e){
  10.             try{
  11.                 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  12.             }
  13.             catch (e){
  14.                 alert("Your browser does not support AJAX!");
  15.                 return false;
  16.             }
  17.         }
  18.     }
  19.     xmlHttp.onreadystatechange=function(){
  20.         if(xmlHttp.readyState==4)
  21.         document.getElementById("userlist").innerHTML=xmlHttp.responseText;
  22.     }
  23.  
  24.     var url = "inc_userlist.asp";
  25.     var params = "user=" + user;
  26.     xmlHttp.open("POST", url, true);
  27.     xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  28.     xmlHttp.setRequestHeader("Content-length", params.length);
  29.     xmlHttp.setRequestHeader("Connection", "close");
  30.     xmlHttp.send(params);
May 9 '08 #1
3 1382
drhowarddrfine
7,435 Expert 4TB
There is no content being served to FF.

And this:
Error: document.getElementById("Addlink") has no properties
Source File: http://www.forwardpage.com/test/user.asp?id=alan
Line: 54
May 9 '08 #2
alan75
60
thanks for pointing out the error!

i'm still very green in ajax, how did you capture the error message?
May 11 '08 #3
acoder
16,027 Expert Mod 8TB
Check the error console or get Firebug.
May 12 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: noballack | last post by:
I've got a problem, I'm working with Ajax in a web with a form with a list of checkbox added to the form via an Ajax.Updater method. These added checkboxs are not been sended by the form if I use...
1
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest...
8
by: Bill Gower | last post by:
I have a webapp that uses the AjaxControlToolkit. The app and ajax works fine when run within my dev server in Visual Studio 2005 but does not work on IIS. Any Suggestions? Bill
10
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario -------------...
5
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I...
22
by: sheldonlg | last post by:
I am looking for a clean solution to a problem that I solved in, what I call, a "dirty" way. Here is what I want to do. I have a dropdown list. Clicking on an item in the dropdown list invokes...
1
by: Mark B | last post by:
This is my first try at using AJAX. I want the calendars to be enabled if the user checks CheckBox1. It works OK for a normal all page refresh but once I introduced the AJAX code it stopped...
3
by: George | last post by:
I am doing an AJAX call using JQuery on my page to which returns JSON objects and everything works fine. Now I decided to use ashx handler instead of and simply write JSON out. Then my problems...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.