473,320 Members | 2,083 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.

Cookie and Window.Open?

Can you somehow make a new cookie in javascript code and then use that
cookie in a new http session using Window.Open? It does not seem to be
one of the parameters.

I could open the window as part of an URL with '&' like parameters as
an alternative I think, but I want to propogate login information from
one website to another 'sister' website.

So how can I open a new session and set the authorization cookie in
javascript? Is that at all possible?

Thanks in advance for any suggestions.

Dec 8 '06 #1
2 11058
When you set a cookie it is readable from any page within your site,
even if you do window.open. However the cookie will not be readable
from a different domain(website).

e.g. you set a cookie for www.mysite1.com you will *not* be able to see
this cookie on any page that runs on www.mysite2.com. So if you are
opening a window to mysite2.com from mysite1.com the cookie will not be
received. The only thing i could suggest is to set the cookie for
mysite1.com and then use the parameter in the url as you said, then on
the mysite2.com page reset the cookie for mysite2.com.
marc wrote:
Can you somehow make a new cookie in javascript code and then use that
cookie in a new http session using Window.Open? It does not seem to be
one of the parameters.

I could open the window as part of an URL with '&' like parameters as
an alternative I think, but I want to propogate login information from
one website to another 'sister' website.

So how can I open a new session and set the authorization cookie in
javascript? Is that at all possible?

Thanks in advance for any suggestions.
Dec 8 '06 #2

dalouis schreef:

e.g. you set a cookie for www.mysite1.com you will *not* be able to see
this cookie on any page that runs on www.mysite2.com.
Thanks!

Dec 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
1
by: Display Name | last post by:
Used one of these canned scripts to set up a JS quiz but not before having used another canned PHP script for "Tell your friend about this Web page!" sort of thing. Now i've gotta integrate them;...
3
by: Scott | last post by:
Here is the scenario. I need to launch a popup using window.open, but can't pass everything i need to pass on the querystring. So I thought I would set a cookie. Basically I do: ...
3
by: Brett | last post by:
I'd like to set a session cookie that expires once the browser is closed. I've tried: document.cookie = "wm_javascript=" + escape("SomeName|" + window.document.referrer); with no expires. ...
5
by: Connie Walsh | last post by:
Hi: I gleaned a javascript off of the web: http://www.hypergurl.com/popup.html that sets a cookie everytime someone visits your site. If it is the first visit in x number of days then a...
3
by: davidw | last post by:
Hi, I have my webdav code, I am using cookie to verify user, so user login to our website first, like http://site, then they can open link http://site/webfiles and check "open as web folder", in...
2
by: rn5a | last post by:
A web.config file has the following code: <configuration> <system.web> <authentication mode="Forms"> <forms name="NETConnectCookie" loginUrl="Login.aspx"> <credentials passwordFormat="SHA1"/>...
2
by: Brajendrabraj | last post by:
how can I get user name which come from cookie in differrent window of IE if I already logged in that perticular site for example: i login in site and get username from cookie and display it on...
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
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: 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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.