` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Browser exit instead of timeout
2000-09-05 -- Michael Boston
 
I have examples that do about what you want to do. It includes a timeout function so that if the page is not changed for nn minutes the browser page auto submits an exit to terminate application program and closes the browser window. In the first sample the timeout is 10 minutes. If the browser window has an opener object (it was opened by another browser window) then you can close it with JavaScript. Generally my examples start in their own window and then close that window on exit. This is done by including a small script in the onBodyUnload function like so: if (form.__Special__.value == "EXIT=1") { window.close(); } And the statement: var timerID=setTimeout("autoExit()",600000); And the function: function autoExit(){ icSubmit("EXIT=1") } Then I make sure my Program Exit button's use Variable in the IDE is ?Exit. Thus when the Exit button is submitted for a program exit, the Browser Window closes as the page is unloaded prior to loading the dreaded Clarion Blue Screen or whatever is in page to return to. Thus the Clarion blue screen is never seen and the Client is returned to the original screen that the link was on. I have set up program logic so that a user can Exit from any level of the program with an "Exit Now" button -- which does a complete program exit and closes the browser window. The new application window.open is different for Netscape and IE if you want to control the window size and placement. The samples are at http://207.168.85.50/samples.htm . Feel free to copy whatever you need via view source.


Today is November 21, 2024, 7:04 am
This article has been viewed 35211 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: