|
-
Dec 13th, 2002, 06:12 PM
#1
Thread Starter
Fanatic Member
Javascript populating section on page based on cookies
I have a page that uses asp to provide a list of items. I want to create a server side include that when I click on an item it adds the item to a list of cookies, save the list, and then displays the list in another section on this same page in another table.
I have figured out that javascript can save cookies with out refreshing the page unlike asp. I don't know how I will be able to populate the cookie data into another section of a table. It will be like a chart on the right/left side of a web page that displays all the items I have in my cookie. Do I need to create a form in this table section and then somehow populate it?
Thanks for any help/advice you give.
-
Dec 14th, 2002, 08:44 AM
#2
Fanatic Member
Why do you want to use cookies to transfer values between different parts of a page? You can better use javascript variables for this. Imo cookies should only be used to store variables across different sessions.
-
Dec 14th, 2002, 04:55 PM
#3
Thread Starter
Fanatic Member
You post a good question. I want to put to a cookie because if they do leave and come back the next time they will have the same selections they had last visit. Plus, I have thought of both session variables and having them sign up to create entries into the database. Session variables take resources from the server so if a large number of users are on then the box takes a hit. Writing to a database could take time depending on the amount of users that I get. Yes, you probaboy are thinking I will never get to the size of say ebay, amazon etc.. but I believe if I can get this to work then it would serve the best for performance.
So I guess if you have some ideas for me that would be great on how to do this with cookies.
Thanks.
-
Dec 14th, 2002, 05:38 PM
#4
Fanatic Member
I'm sorry, I've never worked with javascript cookies, and my knowledge about ASP cookies has worn down very much. I can't help you with it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|