473,383 Members | 1,846 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,383 software developers and data experts.

Pls Help: JS for writing a cookie from a form

Hi there,

I have a nice form working in which JS is used to "remember" the
values a user enters in various fields. My problem is:

- In the code, when the inital form tag is simply
<FORM NAME="infoForm"> .... </form> the cookies work great.

- However when the tags look like this (necessary for submitting to
cgi:)

<FORM NAME="infoForm" METHOD="POST" ACTION="http://.../*.cgi"> ....
</form>

The cookie does not work at all. Anyone have an idea why? Thanks in
advance...

-- Mike
Jul 20 '05 #1
1 1224
On 9 Oct 2003 16:28:25 -0700, in comp.lang.javascript
mi**************@hotmail.com (Branner1) wrote:
| Hi there,
|
| I have a nice form working in which JS is used to "remember" the
| values a user enters in various fields. My problem is:
|
| - In the code, when the inital form tag is simply
| <FORM NAME="infoForm"> .... </form> the cookies work great.
|
| - However when the tags look like this (necessary for submitting to
| cgi:)
|
| <FORM NAME="infoForm" METHOD="POST" ACTION="http://.../*.cgi"> ....
| </form>
|
| The cookie does not work at all. Anyone have an idea why? Thanks in
| advance...


Be careful when using cookies for storing input data. Cookies do have
a size limit (1024 bytes if memory serves me correctly). Also the user
may have cookies disabled.

Since you are using the POST method on the form it is easier for the
cgi app to pick up these values anyway. Your cgi app would need to use

var1 = Request.Form("myvar1")

---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 20 '05 #2

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

Similar topics

0
by: collie | last post by:
Hi, I have an asp page that needs to create 2 different cookies: one for the admin and one for the user. The code that I have to work with was created by someone else. the page first requires to...
1
by: koen colen | last post by:
Hello group, I hope you guys can help me out, I am modifying a piece of code from Joe Norman, I did found the code here: http://www.intranet2internet.com/public/default.asp?PAGE=sscript&ID=3 ...
1
by: martingerber | last post by:
Hi, I have the following script (javascript in html document): <html> <head> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> <title>Standort Speichern</title>
4
by: Robin Briggs | last post by:
Hi. I have an ASP (3.0, not .NET) app that writes cookies with hyphens and spaces in the names and values. If I had the control over the apps that will be looking for these cookies, I would...
0
by: Nicolas Joly | last post by:
Hello, I have this (a cookie writer) <script runat="server"> void WriteClicked(Object Sender, EventArgs e) { //Create a new cookie, passing the name into the constructor HttpCookie cookie =...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: dotnettester | last post by:
Hi, I am trying to test if the client browser would support cookies and they way I am doing it by adding the cookie on the first visit and checking the cookie on a form post. The problem is...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.