|
-
Jun 10th, 2001, 08:11 AM
#1
Thread Starter
Addicted Member
cookies - vbscript - client side
How do I get and/or set cookies using client-side VB script?
-
Jun 10th, 2001, 09:52 AM
#2
New Member
dont try this, cookies are good for server side only.
-
Jun 10th, 2001, 01:39 PM
#3
Frenzied Member
Cookies are set through the Response object which is server side only.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Jun 11th, 2001, 03:32 AM
#4
Thread Starter
Addicted Member
thanks for the response, but that's not what i expected i'm affraid.
what i want to achieve is that to not bother to go to the server if the cookie is not there anyway....
client-side cookie handling is possible using javascript, so i presume that vbscript should be able to do the same...
anyone?
-
Jun 11th, 2001, 06:24 AM
#5
Black Cat
VBScript generally uses the same Object Model as Javascript/JScript, just the syntax is different.
From MSDN:
Code:
<SCRIPT LANGUAGE="VBSCRIPT">
Sub SetCookie
document.cookie = "MyVar='101'; path='page1-2.htm'"
End Sub
</SCRIPT>
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 11th, 2001, 12:53 PM
#6
Lively Member
Now im confused
Okay, if u need the cookie stuff done on the client side, then what is wrong with using Javascript?
Its as simple as document.cookie
all u do is make it equal to a string with the variable u need in the cooke and the date...to know when the cookie expires.
I can put all the code here if u want. Just don't remember it off hand.
But lemme know why u want to use VBscript for something that as far as I know Javascript is more than adeopt at handling?
You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!
-
Jun 12th, 2001, 10:25 AM
#7
Thread Starter
Addicted Member
Well, i need to use vbscript because i'm writing an intranet application for users using IE5 up, and it need to do some stuff on the client machine. Since it's intranet, the security is set to allow this. Javascript does not have the possibility to do stuff on the client machine. That's why.
By the way, thanx JoshT for the setcookie code, is there one also for [b]get[b]cookie?
cheers
-
Jun 12th, 2001, 10:43 AM
#8
Black Cat
You're welcome. Not off hand, but if you have an example using client side javascript, all you'd have to do is modify the syntax for vbscript.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|