473,938 Members | 4,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11515
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
8866
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 (same folder). The cookie is not received. Can someone explain why? I worked around this by adding a cache-control header with a value of no-cache. This fixes the problem. Unfortunately that causes another problem with Internet Explorer...
1
2475
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; client wants the results from the quiz to go into the email. The file "quizconfig.js" parses the form-submitted test results & the test results page (quiz1_results.htm), in turn, shows the score. The JS in the quizconfig.js appears to set a...
3
3346
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: setCookie('NameList', aReallyLongListOfNames); window.open(aWindowThatNeedsToReadNameList); then in the window (on the server side) I try to access the cookie,
3
6403
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. This doesn't set a cookie. It seems I must put in an expiration for the cookie to set. The code below does work: var the_name = window.document.referrer;
5
2001
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 popup will appear. It would be great for my application but I can't get it to work. Here is my code:
3
1562
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 my code, I will check cookie under http://site and control the user's permission. It worked fine, but recently, I found when user open http://site/webfiles from XP, there is no cookie return even the cookie is there. And the same action under...
2
2730
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"/> </forms> </authentication> </system.web>
2
1632
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 page .....and msg. shows welcome <user name> if i already open this window and open another window of IE then it should display the value of user name, not asking once again for sign in. this user name is coming from server side made...
0
10125
marktang
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...
0
11507
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, 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...
1
11281
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,...
0
9851
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8207
isladogs
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...
0
7377
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6072
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4899
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
2
4441
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.