Help - Search - Members - Calendar
Full Version: mmmm cookies
HTMLHelp Forums > Programming > Client-side Scripting
rhyz
i have been trying to make and display cookies for ages and never understood what i was really doing.

what i want to do is have a page where a person selects a colour (blue , white)
then when on the main page i want the cookie to be read then change the pictures accordingly

from what i have reasearched you have a:

name , value , expire

in my case i would want

hpborder , (blue/white) , 365

could you please help me create this as it would be a tonnes of help

recap

create cookie, read cookie, change code so it displays setting
Darin McGrew
What kind of program are you writing? Client-side JavaScript? Server-side PHP, Perl CGI, Java, ASP, or something else?
rhyz
hmmmmmm....

at the moment it is just a intranet, everything is html.

i have a main folder with everything in and everyone uses their personel main page (index.html)

i have some borders which are rounded rectangles with white centers i want to make a few more colours and let them choose
what colour they want i thought the best way to save the prefrences was to use cookies and once using cookies this will extend my html/javascript knowlege

sorry spelling mistakes happy.gif ohhh i dunno if it maters but i used notepad to make everything
pandy
You can't do cookies in HTML. Some scripting language must write and read them.
rhyz
QUOTE(pandy @ Feb 12 2009, 03:33 PM) *

You can't do cookies in HTML. Some scripting language must write and read them.



what do you mean exactly, i need to write in php htm? i have made and used cookies in html when i was trying to learn about it i entered name and it was then displayed via document .write

sorry im so stupid when it comes to javascript
pandy
CODE
what do you mean exactly, i need to write in php htm? i have made and used cookies in html when i was trying to learn about it i entered name and it was then displayed via document .write


Either PHP or some other server side language or JavaScript. document.write() is JavaScript, so that must be what you used.
Darin McGrew
I've moved this to the Client-side Scripting forum, since that's where it looks like it belongs.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.