473,385 Members | 1,642 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,385 software developers and data experts.

IE(6,7) and XmlHttpRequest Problem...

101 100+
Hi everyone.

I have some javascript function which I call like this:

DoXHRequest("somepage.asp", "POST", params, TheCallbackFunction);

DoXHRequest is defined something like this:

(xmlHttp is XmlHttpRequest properly defined elsewhere)

Expand|Select|Wrap|Line Numbers
  1. function DoXHRequest(url, params, CallbackMethod)
  2. {
  3. xmlHttp.onreadystatechange = CallbackMethod;
  4. xmlHttp.open("GET", url + "?" + params , true);
  5. xmlHttp.send(null);
  6. }
  7.  
that function is called for example in some "onclick" handler for button (or
anything else)
in callback there is usual...

[PHP]function TheCallback
{
if (xmlHttp.readyState == 4) { do something }
}[/PHP]

However, this works ok in IE(6,7) ONLY FIRST TIME CLICKED (DoXHR function
invoked), on second click xmlHttp never gets (again) to readyState 4 (or
never invokes callback method again?).

In Firefox everything works perfectly.

Please Help .....


Regards,
Nov 10 '07 #1
1 1414
acoder
16,027 Expert Mod 8TB
DoXHRequest expects three parameters and you're giving it 4.
Nov 12 '07 #2

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

Similar topics

1
by: Laphan | last post by:
Hi Guys Wonder if you could help. I have set up what I thought was a standard DHTML folder view at http://www.AstraAccounts.co.uk, but the actual icons on this folder list don't get displayed...
1
by: martinjgriffit | last post by:
ARRRRGHH! i've encountered a problem that only seems to rear its ugl head in IE. Please check out the following URL... http://www.markcain.info/rjb Heres an excerpt of my styles as...
3
by: Robert Cerny | last post by:
Hi everybody, I encounter the following layout problem in IE 6.0.28: Even on specifying "white-space: nowrap" and "overflow: hidden" the paragraph shoots out over the boundaries of the width...
6
by: Prototipo | last post by:
I'm making a CSS menu and I have a problem (yet another "Gecko/IE different behaviour with the same code" problem). This menu uses unordered lists, with li elements that contain hyperlinks. The...
4
by: Anna Quick | last post by:
I am quite new to javascript, and don't seem to find the problem with stupid internet explorer. The script works fine in safari and mozilla. I searched the groups, but evidently put in the wrong...
3
by: Vijay | last post by:
Hi Folks, I having one issue, in my application I am going to use the server push for streaming the data by keeping the connection open. At client side, i am having the XMhttprequest object (i.e...
3
by: Ralph | last post by:
Hi I have small function to generate my form controls: function buildInput(sType, vValue, vId, sName, sLabel){ var oInput = null; var oLabel = document.createElement('label'); var oCont =...
9
by: Alan Silver | last post by:
Hello, Please look at http://www.kidsinaction.org.uk/ie/ie.html in IE6 and notice that there is a white vertical line on the right of the white bit. This is caused (AFAICS) by IE not putting the...
3
by: cwroblew | last post by:
I am using an Iframe to include an html file that changes about 5 times a day. The background color is not white which causes a problem with IE because IE puts a white box around my Iframe. Firefox...
12
by: maya | last post by:
amazing, the stupid things IE does sometimes... inserted a simple <hrtag in sidenav here, www.francesdelrio.com/photoblog_new/india/page9/photos.jsp in FF it looks fine, in IE (both 6 and 7)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.