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('Name List', aReallyLongList OfNames);
window.open(aWi ndowThatNeedsTo ReadNameList);
then in the window (on the server side) I try to access the cookie,
but it is not there. What gives? I know that document.cookie has the
NameList before the window.open call. 3 3305
On 9 Jul 2004 15:20:00 -0700, in comp.lang.javas cript sc********@hotm ail.com (Scott) wrote: | 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('Name List', aReallyLongList OfNames); | window.open(aWi ndowThatNeedsTo ReadNameList); | | then in the window (on the server side) I try to access the cookie, | but it is not there. What gives? I know that document.cookie has the | NameList before the window.open call.
You could try using POST to send all of your data to the pop-up
window.
<form name="f1" method="post" .....>
popup would need
<%
v1 = Request.Form("v alue1")
etc etc etc
%>
Both the GET and POST methods have length limitations (200+ characters
and 4k respectively). Cookies also have a size limit (4k). If your
data is still exceeding this limit then you will have to rethink what
data you are transmitting between pages.
Because of the way the popup windows communicates its data back to the
parent, i need to use window.open. How would I do that with a post? I
kicked around the idea of doing a post but I couldn't figure out how
to make it work with window.open.
TIA
Scott Monte
Jeff North <jn****@yourpan tsbigpond.net.a u> wrote in message news:<m9******* *************** **********@4ax. com>... On 9 Jul 2004 15:20:00 -0700, in comp.lang.javas cript sc********@hotm ail.com (Scott) wrote:
| 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('Name List', aReallyLongList OfNames); | window.open(aWi ndowThatNeedsTo ReadNameList); | | then in the window (on the server side) I try to access the cookie, | but it is not there. What gives? I know that document.cookie has the | NameList before the window.open call.
You could try using POST to send all of your data to the pop-up window. <form name="f1" method="post" .....>
popup would need <% v1 = Request.Form("v alue1") etc etc etc %> Both the GET and POST methods have length limitations (200+ characters and 4k respectively). Cookies also have a size limit (4k). If your data is still exceeding this limit then you will have to rethink what data you are transmitting between pages.
On 10 Jul 2004 07:04:06 -0700, in comp.lang.javas cript sc********@hotm ail.com (Scott) wrote: | Because of the way the popup windows communicates its data back to the | parent, i need to use window.open. How would I do that with a post? I | kicked around the idea of doing a post but I couldn't figure out how | to make it work with window.open.
page1.asp
---------
<html>
<head>
<title>Page 1</title>
</head>
<body>
<FORM action="page2.a sp" METHOD="post" name="f1" target="_blank"
id="f1" >
<table width="100%" border="0" cellspacing="0" cellpadding="5" >
<tr><td><inpu t name="text1" type="text" value="text1" /></td></tr>
<tr><td><inpu t name="text4" type="text" id="text4" value="text4"
/></td></tr>
<tr><td><inpu t type="submit" name="Submit" value="Submit"
/></td></tr>
</table>
</FORM>
</body>
</html>
page2.asp
---------
<%@LANGUAGE="JA VASCRIPT" CODEPAGE="1252" %>
<%
Response.Write( "+++" + Request.Form + "+++" );
%>
<html>
<head>
<title>Page 2</title>
</head>
<body>
</body>
</html>
| TIA | Scott Monte | | Jeff North <jn****@yourpan tsbigpond.net.a u> wrote in message news:<m9******* *************** **********@4ax. com>... | > On 9 Jul 2004 15:20:00 -0700, in comp.lang.javas cript | > sc********@hotm ail.com (Scott) wrote: | > | > >| 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('Name List', aReallyLongList OfNames); | > >| window.open(aWi ndowThatNeedsTo ReadNameList); | > >| | > >| then in the window (on the server side) I try to access the cookie, | > >| but it is not there. What gives? I know that document.cookie has the | > >| NameList before the window.open call. | > | > You could try using POST to send all of your data to the pop-up | > window. | > <form name="f1" method="post" .....> | > | > popup would need | > <% | > v1 = Request.Form("v alue1") | > etc etc etc | > %> | > Both the GET and POST methods have length limitations (200+ characters | > and 4k respectively). Cookies also have a size limit (4k). If your | > data is still exceeding this limit then you will have to rethink what | > data you are transmitting between pages. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Agent M |
last post by:
Hi there
New to PHP. Im trying to set a cookie but for some reason it wont work.
The code is inside a Submit button and happens after I have read the MySQL
database and succesfully retrieved the record. For some reason the cookie is
not created.
Here is the code
setcookie("firstname",$firstname,time() + (7 * 86400));
|
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...
|
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...
|
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:
|
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>
| |
by: marc |
last post by:
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...
|
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...
|
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: 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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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...
|
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();...
|
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.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |