25-10-2007, 13:07
|
#1
|
|
Inactive
Join Date: Jun 2003
Location: London way
Age: 49
Services: Sarcasm
Posts: 8,376
|
XMLHttpRequest
Ok, I'm stumped - and maybe someone here will know.
I've written a simple XMLRPC client in javascript, using XMLHttpRequest - and this works, I can contact the server, make an RPC, and get a result back - hurrah.
Now my problem comes from trying to pass in a cookie into the request
I do
Code:
request.setRequestHeader('Cookie','aParam=aValue');
which works in Firefox - however in IE7, it doesn't. There used to be a bug where you had to set the cookie twice for it to register in IE, but that doesn't work here.
I'm not getting an error, the cookies just aren't being passed through to the server.
I've tried the ActiveX version of XMLHttpRequest, as well as the new native version in IE7 - both have the same result - I've googled a fair bit but haven't found any answers....
|
|
|
25-10-2007, 15:01
|
#2
|
|
Inactive
Join Date: Jun 2003
Posts: 1,354
|
Re: XMLHttpRequest
The cookie bug in xmlDOM ignores the first command of setRequestHeader and as far as I know, I used the format as below - not with brackets. Dunno if that makes any difference at all but maybe worth a try?
request.setRequestHeader "Cookie", "aParam=aValue"
request.setRequestHeader "Cookie", "aParam=aValue"
Aren't you like supposed to use Set-Cookie now anyway?
|
|
|
25-10-2007, 15:10
|
#3
|
|
Inactive
Join Date: Jun 2003
Location: London way
Age: 49
Services: Sarcasm
Posts: 8,376
|
Re: XMLHttpRequest
Quote:
Originally Posted by Acathla
The cookie bug in xmlDOM ignores the first command of setRequestHeader and as far as I know, I used the format as below - not with brackets. Dunno if that makes any difference at all but maybe worth a try?
request.setRequestHeader "Cookie", "aParam=aValue"
request.setRequestHeader "Cookie", "aParam=aValue"
Aren't you like supposed to use Set-Cookie now anyway?
|
That's not javascript though is it? - probably vbscript.
And Set-cookie is done on the server side, whereas I'm passing it into an xmlhttprequest.
|
|
|
25-10-2007, 16:17
|
#4
|
|
Inactive
Join Date: Jun 2003
Posts: 1,354
|
Re: XMLHttpRequest
oh yeah doh. i forgot i code in vbscript  )
if i come across anything I'll let you know.
|
|
|
25-10-2007, 16:18
|
#5
|
|
-
Join Date: Jul 2003
Location: Poole, Dorset
Age: 40
Services: FreeSat+
Tivo
V-Box
VM 60MBit
Posts: 13,365
|
Re: XMLHttpRequest
That's the precise trouble with all of these niche Client-Side languages!!!
|
|
|
25-10-2007, 16:21
|
#6
|
|
Inactive
Join Date: Jun 2003
Location: London way
Age: 49
Services: Sarcasm
Posts: 8,376
|
Re: XMLHttpRequest
Quote:
Originally Posted by Zeph
That's the precise trouble with all of these niche Client-Side languages!!!
|
I'd hardly call javascript (or vbscript) a niche language...
|
|
|
25-10-2007, 16:21
|
#7
|
|
-
Join Date: Jul 2003
Location: Poole, Dorset
Age: 40
Services: FreeSat+
Tivo
V-Box
VM 60MBit
Posts: 13,365
|
Re: XMLHttpRequest
They are! They have their own little niches with their own niche users, like yourselves  OK perhaps going a bit overboard calling Javascript a niche language, but I know of many more Javascript coders than I do VB?
|
|
|
25-10-2007, 16:30
|
#8
|
|
Inactive
Join Date: Jun 2003
Location: London way
Age: 49
Services: Sarcasm
Posts: 8,376
|
Re: XMLHttpRequest
Quote:
Originally Posted by Zeph
They are! They have their own little niches with their own niche users, like yourselves  OK perhaps going a bit overboard calling Javascript a niche language, but I know of many more Javascript coders than I do VB?
|
certainly there's less vbscript people out there now, but a lot of places do still use vbscript.
|
|
|
25-10-2007, 16:32
|
#9
|
|
-
Join Date: Jul 2003
Location: Poole, Dorset
Age: 40
Services: FreeSat+
Tivo
V-Box
VM 60MBit
Posts: 13,365
|
Re: XMLHttpRequest
Does it have any advantages over JScript?
|
|
|
25-10-2007, 16:57
|
#10
|
|
Inactive
Join Date: Jun 2003
Location: London way
Age: 49
Services: Sarcasm
Posts: 8,376
|
Re: XMLHttpRequest
Quote:
Originally Posted by Zeph
Does it have any advantages over JScript?
|
personally I don't think it does, on the web side of things - especially since not all browsers support it - but I'm sure someone will disagree with me
Personally I've never been a big fan of it, since I learnt javascript first, and got exposed to vbscript through a rather nasty project involving web based version control - but as I say, lots of people still use it
|
|
|
25-10-2007, 19:17
|
#11
|
|
laeva recumbens anguis
Cable Forum Mod
Join Date: Jun 2006
Age: 69
Services: Premiere Collection
Posts: 43,917
|
Re: XMLHttpRequest
"Danger, Will Robinson!"
“Warning! Warning! Geeks in immediate vicinity†........
[img]Download Failed (1)[/img]
__________________
Thank you for calling the Abyss.
If you have called to scream, please press 1 to be transferred to the Void, or press 2 to begin your stare.
If my post is in bold and this colour, it's a Moderator Request.
|
|
|
25-10-2007, 19:18
|
#12
|
|
-
Join Date: Jul 2003
Location: Poole, Dorset
Age: 40
Services: FreeSat+
Tivo
V-Box
VM 60MBit
Posts: 13,365
|
Re: XMLHttpRequest
Without Geeks you'd still be carrying stuff rather than using one of those handy "WHEEL" devices :p
|
|
|
25-10-2007, 19:21
|
#13
|
|
laeva recumbens anguis
Cable Forum Mod
Join Date: Jun 2006
Age: 69
Services: Premiere Collection
Posts: 43,917
|
Re: XMLHttpRequest
Quote:
Originally Posted by Zeph
Without Geeks you'd still be carrying stuff rather than using one of those handy "WHEEL" devices :p
|
You're confusing geeks with engineers....
btw, I am in charge of 135 geeks, so I know of what I speak.....
__________________
Thank you for calling the Abyss.
If you have called to scream, please press 1 to be transferred to the Void, or press 2 to begin your stare.
If my post is in bold and this colour, it's a Moderator Request.
|
|
|
25-10-2007, 19:28
|
#14
|
|
-
Join Date: Jul 2003
Location: Poole, Dorset
Age: 40
Services: FreeSat+
Tivo
V-Box
VM 60MBit
Posts: 13,365
|
Re: XMLHttpRequest
Engineers are just a subclass of geek
|
|
|
25-10-2007, 22:16
|
#15
|
|
Inactive
Join Date: Jun 2003
Location: London way
Age: 49
Services: Sarcasm
Posts: 8,376
|
Re: XMLHttpRequest
Quote:
Originally Posted by foreverwar
"Danger, Will Robinson!"
“Warning! Warning! Geeks in immediate vicinity” ........
 
|
Shut yer face!
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 19:02.
|