View Full Version : JavaScript Cookies: Different page depending on user's preference

08-24-2002, 02:20 AM
I currently have a frame on my website to select the background music (a simple table with a drop-down list and an <EMBED> tag). I have been trying to use cookies to remember this choice between visits, but all to no avail.
I have tried various scripts for multiple JS archives and they all either give errors or direct me to the wrong page. I havn't even been able to get one of them to set a cookie.

Please can someone help me with both the setting the cookie (to choose the prefered page (there is a different page for each piece of music)), the changing of the cookie (in case the user changes their mind) and also reading the cookie and redirecting to the required page.

Thanks a lot.:)

08-24-2002, 03:45 AM
I think I can help you, but do you have a link or something so that I can see exactly what you're trying to do?

08-24-2002, 04:21 AM
Use the cookie scripts that I explained in this post:


It may help you with what you're trying to do.

08-24-2002, 01:49 PM
OK, well the address of the page is http://www.gillard.plus.com/mcg/default.htm and as you will be able to see the top frame of that selects the background music.
I would like to have the selection saved as a cookie on the user's computer so that they only have to select it once.
I don't mind having to include a popup window with the drop-down list of background music, which can then link to something if that is required.
Currently there is only 1 piece of music on there because I havn't got round to doing the others yet. There will be about 20 when I've done them all though.

Thanks again.