codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ONUNLOAD  ravikumargandhe at 09:41 on Thursday, July 24, 2008
 

HI All,


I placed a code in onunload() event,the code with in the onunload() event is it will excute a page and delete the session ,here everything is working fine when the particularpage is fullyloaded and then close the window,and if the page is not fullyloaded and if we close the window then the code which is in onunload event is not working fine.


can anybody help me to solve the problem,so that the code should work even if it is not fully loaded

  ONUNLOAD  godlymathew77 at 08:26 on Sunday, August 10, 2008
 

Hi,
i have a small solutionm which i used in my application ro clear session.


> genarate a new popup window, when u called unload event, and load the file which ur using to clear seeion into new popup window.
> call window.close function on our new popup winow.onload.

eg:

ur web page:
window.open("sessionclear.asp","...,height=50,width=50,...")


sessionclear.asp

<script language="javascript">
window.onload=window.close;
</script>








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
• I Need Help
• User input validation
• Create a wrapper for a COM Dll
• HashMaps
• HashMaps
• NEED HELP! Urgent
• Re: Exciting Open Source Project in C++
• Re: The Ballarat Airline Company (BAC)
• Re: problem getting prompt window to work on IE


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008