June 25, 2005, 07:29 PM
mulder75Close (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
dhagenIf 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 28, 2005, 01:12 AM
Francis MarianiWell, 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
mulder75Hey! That works pretty good.