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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set and read cookies in client side script?

Status
Not open for further replies.

hdougl1

Programmer
Dec 6, 2000
54
0
0
US
Can and how do you set and read cookies via client side VB script? Heres what I am trying that does not work.
Thanks

<SCRIPT LANGUAGE=vbscript>
<!--
Sub SetCalendarDates_Click
Dim SelectedDate

If document.cookie(&quot;coDateSet&quot;) <> &quot;&quot; Then
SelectedDate = document.cookie(&quot;coDateSet&quot;)
Else
document.cookie(&quot;coDateSet&quot;) = SelectedDate
End If

End
 
Change to request.cookies
Does that work? Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Thanks, but that didn't work. I believe that would only work in server side processing, which I've done lots of times but never on the client side.
 
Read thru this

Cookies set thru vbscript as in response.cookies(&quot;123&quot;)=&quot;Hello&quot; are saved on the users computer
and use
request.cookies(&quot;123&quot;) to retrieve the value

I think document.cookie is a javascript command not vbscript Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top