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

Adding Variable To Close Window Statement

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
I have the following code that closes a window. -

<td align="right"><a href="javascript:void(0)" onclick="window.opener=self;window.close();"><font face="Tahoma" color="#000080" size="4"><b>Close</b></font></a></td>

The problem is that I want to add -
Session("CanEdit") = "False" so it changes the value of the session variable when it closes. Otherwise I am stuck with that value when the user opens the form again.
 
You can try adding that line of code to the Session_OnEnd Subroutine of your Global.asa file.

Good Luck!
 
You can try adding that line of code to the Session_OnEnd Subroutine of your Global.asa file.

Which would only be called once the session expires -> after 20 mins (or whatever it's explicitly set to)

To change the value of the session variable when the window is closed you need to perform an AJAX routine to invoke an ASP file that will change the variable server side. There's a TON of documentation on AJAX - just do a google search to get started. If you continue to have problems post in the javascript forum, as it won't really pertain to ASP at that point.

-kaht

Looking for a puppy?

[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top