session variable

Results 1 to 3 of 3

Thread: session variable

  1. #1
    Join Date
    Dec 1969

    Default session variable

    When a user exits a webpage using IE by clicking on the X, it runs the onunload event.<BR>I need to take the value that is currently stored in the name field on the form<BR>and put it into a session variable so I can use it when it goes to the next page.<BR>Is there away to assign the javascript variable to the session variable????<BR><BR>&#060;SCRIPT LANGUAGE="JavaScript"&#062; <BR> &#060;!-- <BR>function logoffuser(){ <BR>var jumpToHere; <BR>var winOptions; <BR>var popUpWindow; <BR>jumpToHere = "test11.asp"; <BR>winOptions = "top=100,left=200,width=300,height=100,scrollbars= no"; <BR><BR>var;<BR>&#060;%session("cas e")%&#062; = a;<BR><BR>popUpWindow = open(jumpToHere, "MyWindow", winOptions); <BR> } <BR>//--&#062; <BR>&#060;/SCRIPT&#062;

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default You cant do that

    wat you do it go to another page and do it on the server side there<BR><BR><BR>pass the name in the querystring <BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default why?

    Why not have a form on the page, and when the close function is called:<BR> -post the form to the server<BR> -have the server record that value as a session variable<BR> -if needed have a hidden field telling the server to redirect, and where to redirect to<BR> -have the server handle the redirect to the next page<BR><BR>I&#039;m unclear by what the original poster means by &#039;the x&#039;. It reads like you&#039;re closing the browser, but if you&#039;re closing the browser I don&#039;t see how you&#039;re navigating to some other page, so I&#039;m assuming it&#039;s actually something on your screen?

Posting Permissions

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