Session Variables in JavaScript?

Results 1 to 2 of 2

Thread: Session Variables in JavaScript?

  1. #1
    Join Date
    Dec 1969

    Default Session Variables in JavaScript?

    Hey guys, is there any way I can use a session variable in JavaScript? I have greatly enjoyed using them in VBScript as they make programming much easier, and was hoping to do the same here.<BR><BR>Stephen

  2. #2
    Join Date
    Dec 1969

    Default No such things as Session Variables

    Normally, I ignore people who call them that.<BR><BR>But your question points out the misunderstandings that arise by not being a bit pedantic.<BR><BR>So called "session variables" are *actually* just key/value pairs in a collection named "Contents" which is a member of the built-in ASP OBJECT named "Session". <BR><BR>In other words, when you do<BR> Session("foo") = 7<BR>you are really just doing a shorthand form similar to <BR> Session.Contents.Add "foo", 7<BR><BR>For your question, the important part is that Session is a *BUILT IN* object in the ASP system.<BR><BR>ASP. That thing that runs as a plugin to the IIS web server. Which runs on the server machine in Tuscaloosa, Alabama. Not on the client machine in Fairbanks, Alaska. <BR><BR>There&#039;s no ASP running on that client machine, is there? So then where can the Session object run on the client machine????<BR><BR>Enough said?<BR><BR>************<BR><BR>*IF* you meant that you wanted to use Session values with JScript, as an alternate scripting language under ASP, then the answer is different. But somehow I doubt that&#039;s what you meant.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts