HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 8th, 2004, 05:50 AM
zastil zastil is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: properties sale france
Posts: 17 zastil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 26 sec
Reputation Power: 0
Large Form / Cookie data till complete

I have a really long form for a mortage application. On exit of every field on maybe on timer event the field values will be written to a cookie. I heard there is a limit to size of cookie stored on clients pc.

Any got some example code of how todo this.

i.e. best to write to cookie every exit from field or create timer event say automatic save of data.

Reply With Quote
  #2  
Old April 24th, 2004, 12:02 AM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
I've accomplished similar accomplishments using Session variables. You can just store them until the form is done. Once the form is complete use Session.Abandon(). This is in case people's browsers are not accepting cookies.
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.


Reply With Quote
  #3  
Old April 25th, 2004, 12:31 AM
nschafer's Avatar
nschafer nschafer is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: Florida
Posts: 584 nschafer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 46 m 5 sec
Reputation Power: 5
Correct me if I'm wrong, but if a user is not accepting cookies, then I was under the understanding that session variables would not work either since the session ID is stored as a cookie.

Also, and again my understanding here may be flawed, I didn't think it was possible to access session variables from javascript. If placing the value in either a cookie or session variable as soon as the user enters the data is the desired effect, the javascript would normally be used.

In any case I would do the following to set the cookies:
place the following in the <head> section of your page

Code:
function setCookie(name, value)
{
	document.cookie= name + "=" + escape(value) +
}


then in your form modify your <input> tags to include an onchange event

Code:
 
<input type="text" name="LastName" onChange="setCookie('LastName',this.value)">
 

This will create a cookie name LastName with the value of the whatever the user input to the text field.

I hope this helps.
__________________
Neal Schafer
The early worm gets eaten.

Reply With Quote
  #4  
Old April 25th, 2004, 12:35 AM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
I'm not sure if the session id is stored as a cookie or not.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Large Form / Cookie data till complete


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway