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

XMLHttpRequest in IE7

i am working with XMLHttpRequest.

it is supporting in both IE6,IE7 and mozilla in localhost

But when it comes to site after hosting it doesn't in IE7.
but XMLHttpRequest does in IE6 and Mozilla.

Does any one can help me with this.

Thanking you in advance.
Vinod
Feb 26 '07 #1
6 1880
dorinbogdan
839 Expert 512MB
But when it comes to site after hosting it doesn't in IE7.
It may require some security settings? By default IE7 is more restrictive.
Feb 26 '07 #2
Are you working with XML? If so, is it being served as "text/xml"?
Feb 27 '07 #3
AricC
1,892 Expert 1GB
i am working with XMLHttpRequest.

it is supporting in both IE6,IE7 and mozilla in localhost

But when it comes to site after hosting it doesn't in IE7.
but XMLHttpRequest does in IE6 and Mozilla.

Does any one can help me with this.

Thanking you in advance.
Vinod
Please post the code so we can see what is going on with the problem.
Feb 27 '07 #4
Please post the code so we can see what is going on with the problem.

my application when Country dropdown is selected the state and city drop down should be filled..

i am using this by callback.

my code is ..

if (window.XMLHttpRequest)
{
var xmlRequest = new XMLHttpRequest();
postData = __theFormPostData +
"__SCRIPTCALLBACKID=" + eventTarget +
"&_ScriptcallType=" + callType +
"&__SCRIPTCALLBACKPARAM=" + escape(eventArgument + "$" + callType).replace(re, "%2B");

if (pageUrl.indexOf("?") != -1)
{
xmlRequest.open("GET", pageUrl + "&" + postData, false);
}
else
{
xmlRequest.open("GET", pageUrl + "?" + postData, false);
}
xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlRequest.send(null);
try
{
response = xmlRequest.responseText;
status = xmlRequest.getResponseHeader("__SCRIPTCALLBACKSTAT US");

if (status == "200")
{
ShowResponse(response, context);
}
else
{
ShowErrorResponse(response, context);
}
else
{
var xmlRequest = new XMLHttpRequest();

xmlRequest.onreadystatechange = WebForm_OnClientCallbackComplete;

var __callbackObject = new Object();
__callbackObject.xmlRequest = xmlRequest;
__callbackObject.eventTarget = eventTarget;
__callbackObject.eventArgument = eventArgument;
__callbackObject.context = context;

addToCallbackList(__callbackObject);

postData = __theFormPostData +
"__SCRIPTCALLBACKID=" + eventTarget +
"&_ScriptcallType=" + callType +
"&__SCRIPTCALLBACKPARAM=" + escape(eventArgument + "$" + callType).replace(re, "%2B");

if (pageUrl.indexOf("?") != -1)
{
xmlRequest.open("GET", pageUrl + "&" + postData, false);
}
else
{
xmlRequest.open("GET", pageUrl + "?" + postData, false);
}
xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlRequest.send(null);
}

}
Feb 27 '07 #5
dorinbogdan
839 Expert 512MB
I would try also the classic method of creating the XMLHTTP object:
[HTML]var xmlRequest;
try
{ // Firefox, Opera 8.0+, Safari
xmlRequest=new XMLHttpRequest();
}
catch (e)
{ // Internet Explorer
try
{
xmlRequest=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlRequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
alert("Your browser does not support AJAX!");
return false;
}
}
}
[/HTML]
Feb 27 '07 #6
I may have the same problem. FF2 and IE6 both work, but IE7 does not. I looked at the network using wireshark. The XML request goes to the server, and the response comes back, but the response field is empty. I'm using prototype.js as the basis for the script.
Mar 5 '07 #7

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

Similar topics

10
by: Matt Kruse | last post by:
I'm aware of the circular reference memory leak problem with IE/closures. I'm not sure exactly how to resolve it in this situation. Also, Firefox appears to grow its memory size with the same code....
21
by: Joe Attardi | last post by:
Hey all! I was reading over at the IE Blog the other day http://http://blogs.msdn.com/ie/] and read some interesting, and encouraging news. According to Sunava Dutta, an IE Program Manager,...
13
by: TLaufenberg | last post by:
I'm new to Javascript programming and I've run into a bit of a snag with making an XMLHttpRequest in the Safari browser. Actually, the request doesn't work in Firefox either but only when I use a...
5
by: Peter Michaux | last post by:
Hi, The FAQ correctly says the following: "Mozilla (NN6.2+, Firefox, Ice Weasle etc), Opera 7.6+, Safari1.2+, the Windows version of IE versions 5+, and some other browsers provide the XML...
1
by: Charlie | last post by:
I am trying to make an XMLHttpRequest which violates the default "same- origin"policy in Firefox. I checked the archives and found a method that should work but it does not. Below is the test code...
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...
1
by: Tarik Monem | last post by:
OK, I'm pretty sure this cannot work because I'm trying to use JavaScript (client-side) to write to an xml file (which is server-side) using XMLHttpRequest. Can I use PHP do what I'm trying to do?...
6
by: Patrick Nolan | last post by:
I'm working on cross-platform portability of some javascript. My Macintosh testing platform is rather old. It has Safari 1.3.2 and Internet Explorer 5.2. I got Safari working, but now IE is...
2
by: Michael Nemtsev [MVP] | last post by:
Hello, In the current application we have several httpmodules to process pages, and we have several pages with calls directly through the XMLHttpRequest. Now the requiremens is to detect the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.