When I execute the following example code from my local test
environment:
var [xmlhttp object set based on availability]
xmlhttp.open("H EAD", "http://www.google.com" ,true);
xmlhttp.onready statechange=fun ction() {
if (xmlhttp.readyS tate==4) {
alert(xmlhttp.g etAllResponseHe aders())
}
I personally get a "Permission Denied" error but for a bunch of people
at my office this works. I'm assuming that's a SP2 or MS patch/hotfix
thing? Does anyone know exactly why?
My next question is, supposing I can get past the permissions error,
does anyone know if I can use the XMLHTTP object to obtain the cookie
that is passed from a site? When I change "http://www.google.com" to
"/" I can see the entire header passed from my site but it doesn't
contain any cookie info. Any help would be greatly appreciated.
Thanks in advance! 4 3054 pa******@hotmai l.com wrote: When I execute the following example code from my local test environment:
var [xmlhttp object set based on availability] xmlhttp.open("H EAD", "http://www.google.com" ,true); xmlhttp.onready statechange=fun ction() { if (xmlhttp.readyS tate==4) { alert(xmlhttp.g etAllResponseHe aders()) }
I personally get a "Permission Denied" error but for a bunch of people at my office this works. I'm assuming that's a SP2 or MS patch/hotfix thing? Does anyone know exactly why?
In IE you would need to allow access to data sources from a different
domain, check the IE settings for the zone you are loading the page with
the script from.
For Mozilla you need to have your script request permission.
My next question is, supposing I can get past the permissions error, does anyone know if I can use the XMLHTTP object to obtain the cookie that is passed from a site? When I change "http://www.google.com" to "/" I can see the entire header passed from my site but it doesn't contain any cookie info.
If the server sends a cookie you should see it using
getAllResponseH eaders() (well if that is supported, unfortunately Opera
so far it its 8.00 beta doesn't care about such functionality).
--
Martin Honnen http://JavaScript.FAQTs.com/
XMLHTTP uses the same cookie state as IE. If you obtain a cookie from
an XMLHTTP session, it is shared with IE, and vice versa. For example,
if you sign in to yahoo with IE with cookies enabled, and then request
the yahoo home page via XMLHTTP, you'll see that you are already signed
in.
Some older versions of XMLHTTP have bugs regarding https requests, so
make sure all the PCs have the latest version of IE. Also, xmlhttp
disallows transfers between http and https by design, unless the
"access data sources across domains" setting is enabled in IE.
In article <11************ **********@z14g 2000cwz.googleg roups.com>, hu*****@gmail.c om says... XMLHTTP uses the same cookie state as IE. If you obtain a cookie from an XMLHTTP session, it is shared with IE, and vice versa. For example, if you sign in to yahoo with IE with cookies enabled, and then request the yahoo home page via XMLHTTP, you'll see that you are already signed in.
Some older versions of XMLHTTP have bugs regarding https requests, so make sure all the PCs have the latest version of IE. Also, xmlhttp disallows transfers between http and https by design, unless the "access data sources across domains" setting is enabled in IE.
The latest versions also check to see if the site is in the IE Trusted
Zone. That is a huge security issue that M$ had to implement.
I found that out when working on my Hotmail connection article for
Hardcore Delphi. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: fochie |
last post by:
Greetings,
I'm having a problem when I try to GET a file from my server
via xmlhttp when using Mozilla. With IE I can get any type of file
fine, get/display headers fine, etc. With Mozilla, using the same
HTML/JS it always returns no data (xmlhttp.responseText is null).
When I try to get headers using Mozilla or display the http status code
I get some obscure exception in the javascript console that I've given
up on searching for an...
|
by: Ike |
last post by:
Ive copied an online example for writing out a php file, programmatically,
then would like to re-display that data in a browswer window that
automatically refreshes as the data file (getdata.php, which is the file I
am programmatically rewriting to elsewhere) gets changed.
I am trying to use AJAX and JSON to do this. I have copied an example of
using HttpRequest Object as the backbone of this from...
|
by: peterlan |
last post by:
Hello,
I have an issue with a long-running import process in our asp.net app (1.1).
After the user initiates an import, we're trying to make periodic xmlhttp
requests to update a progress bar. In development (running the webserver on
localhost) this works fine. When we move the code to our build environment,
the webserver won't respond to the xmlhttp request until the import is done.
I've tracked the problem down to the session ID cookie...
|
by: balakrishnan.dinesh |
last post by:
hi friends,
Exactly what i want to know is, In my product we are using
xmlhttp request to retrive some data from the server, And Im using IE
browser, its working fine in IE.
Now i want to work with netscape,I dont know how to pass the xmlhttp
request in Netscape. i got some code like below for netscape for
xmlhttp
var oXML=new XMLHttpRequest();
|
by: mike.biang |
last post by:
I have an ASP page that is using an XMLHTTP object to request various
pages from my server. I keep a single session throughout the XMLHTTP
requests by bassing the ASPSESSIONID cookie through the XMLHTTP object.
However, when the page requested through the XML object makes a
<%Response.Redirect()%>
call, a new session is created each time.
Is this a flaw in the XMLHTTP Object? How can I force the session to
remain the same after a...
| |
by: yawnmoth |
last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two
alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP.
If my understanding is correct, the different numbers refer to the
version of Microsoft's XML parser and that Microsoft.XMLHTTP refers to
the latest installed version.
This makes me wonder why sites like
<http://developer.apple.com/internet/webcontent/xmlhttpreq.htmlopt to
use Msxml2.XMLHTTP, first, and...
|
by: mirandacascade |
last post by:
I recognize that this question is not about javascript per se...it is
more about xmlhttp...posting the question at this site because it
appears as though this site has many posts related to xmlhttp
Situation is this:
1) making use of the COM object MSXML2.XMLHTTP in a client application
2) I use the open() method of the COM object and specify a "POST", then
I use the send() method of the COM object
3) when the url is an http url, able...
|
by: Sand Yaah |
last post by:
i went thru a discussion put by eros and helped out by dmjpros.
d questions asked were right and i tried each but there was no problem there.
my code returns null in xmlHttp.responseXML and xmlHttp.responseText returns nothing.
My Code:
function commoPrice()
{
var cid = document.kerala.commodities.value;
if(cid ==0)
|
by: Andrewh |
last post by:
Hi,
I am having a bit of a problem with using xmlhttp. The code of the javascript file is shown below used in Windows XP.
var xmlhttp = null;
function SetURLDiv(url) {
if (window.XMLHttpRequest) {
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |