Focal Point
Close (exit) Button

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6431078331

June 25, 2005, 07:29 PM
mulder75
Close (exit) Button
Is there a way in Resource Layout to have a button that closes the current web page? I've searched and searched...
June 27, 2005, 01:47 AM
dhagen
If your using version 7.x, then create a button and use the onClick event:

self.close();

or use the javascript:

window.opener = self;
window.close();

to prevent IE from prompting you to close the html window.
June 27, 2005, 10:09 PM
mulder75
We are using 5.XX. Frowner
June 28, 2005, 01:12 AM
Francis Mariani
Well, this is is a stupid solution, but it works!

I tried setting up a button in DevStudio 5.3.2 with URL

javascript:window.close();
That did not work.

So here's a solution:

Create an html file called closer.htm with the following contents:

<html><br /><body onLoad="opener.close();self.close();"><br /></body><br /></html>
Make the URL for the Close button in your Resource Layout procedure the following:

http://localhost/approot/test/closer.htm
(Of course, substituting localhost for your server name)

The idea is that you provide DevStudio a valid URL that is an HTML page that, upon loading, closes the window and itself.

You, unfortunately do get an IE popup asking you if you want to close the window.
June 28, 2005, 11:01 PM
mulder75
Hey! That works pretty good. Smiler