| 2:56 am on Aug 1, 2009 (gmt 0)|
Try w3schools [w3schools.com...] for starters.
Welcome to forum.
| 9:51 am on Aug 1, 2009 (gmt 0)|
Hmm, sounds a lot like home work...
| 9:30 pm on Aug 1, 2009 (gmt 0)|
Yes it is homework and i can't do it so i need help.
| 9:51 am on Aug 2, 2009 (gmt 0)|
Was daveVk's suggestion any help?
| 11:53 am on Aug 2, 2009 (gmt 0)|
| 4:52 pm on Aug 2, 2009 (gmt 0)|
Would question 1 answer be something like this?:
document.cookie = "name=John; setTime=03-28-2005; bgColor=red; fgcolor=green;"
And if there is only 1 cookie string why di i need 4 cookies? Isn't 4 properties of the same cookie?
Regarding question 2 would it be something like this:?
function get_cookie ( cookie_name )
var results = document.cookie.match ( '(^¦;) ?' + cookie_name + '=([^;]*)(;¦$)' );
if ( results )
return ( unescape ( results ) );
All i would need to do is to add the colors and date parametres?
I don't know how to do this (question 2..), cookies are a pain :(
Thanks for your help!
| 12:14 am on Aug 3, 2009 (gmt 0)|
The previous reference shows the setCookie function, use this 4 times to set 4 name/value pairs.
Note that document.cookie does not directly represent what is stored in cookie, a read of document.cookie will not return what is written to document.cookie, document.cookie = ... adds to cookie.
What is wrong with the method of retrieving cookie show in reference ? Try your solution using 'try it' link, this should give you good idea of how it works.