Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Object in IE

Status
Not open for further replies.

DigitalBoy

Programmer
Oct 11, 2000
87
US
I'm attempting to write a cookie for IE4 and for the life of me I can't get it to remember the "expires" tag. Has anyone written a cookie specifically for IE4? If so, could you post some sample code? Thanks.

- DB Web Developer
Digital Video Arts, LTD.

AIM: dgtlby
ICQ: 68300740
 
you shouldn't have a problem...this is what I usually use:

Code:
var expireDate = new Date
var cookieName = "name"
var cookieVal = "value"
expireDate.setMonth(expireDate.getMonth()+3)

document.cookie = cookieName + "=" + cookieVal + ";expires=" + expireDate.toGMTString();
-Greg :-Q
 
Greg,

This is what I thought. This is exactly what I had and I wanted to just have it verified. I'm testing some code on a new piece of hardware and the developer(s) forgot to configure it so that cookies would be stored permanently, not just for the current session.

- DB Web Developer
Digital Video Arts, LTD.

AIM: dgtlby
ICQ: 68300740
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top