|
Your time now: Sat Nov 21, 2009 7:47 am
|
View unanswered posts | View active topics
| Author |
Message |
|
mcbc
|
Post subject: Help with cookies Posted: Wed Jun 03, 2009 10:12 pm |
|
Joined: Wed May 21, 2008 4:22 pm Posts: 14
|
|
Hello I have the following code, and I can not get it to work correctly. Any help would be greatly appreciated. [code] <SCRIPT LANGUAGE="JavaScript"> <!-- function SetCookie(cookieName,cookieValue,nDays) { var today = new Date(); var expire = new Date(); if (nDays==null || nDays==0) nDays=1; expire.setTime(today.getTime() + 3600000*24*nDays); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString()+ 'path=/;domain=can-labels.com'; } //--> </SCRIPT> <form name="frmMCQuotes" id="frmMCQuotes" action="feedback.php" method="post" > <table> <tr> <td width="77"><span class="style5"><b> City:</b></span></td> <td width="263"><input type="text" name="Shipping-City" id="txtCityShip" size="20" maxlength="20" /></td> </tr> <tr> <td width="85"><input type="button" value="Calculate" name="btnCalcBC" onClick="SetCookie('ShippingCity',this.form.Shipping-City.value,'1')"/></td> </tr> </table></form> [/code]
|
|
| Top |
|
 |
|
mcbc
|
Post subject: Re: Help with cookies Posted: Fri Jun 05, 2009 6:13 pm |
|
Joined: Wed May 21, 2008 4:22 pm Posts: 14
|
|
I figured it out, I was calling the variable by its name, and not its ID.
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|