
![]()
Home | About Us | Consulting | Tips and Tricks | Presentations | Contact Us
Tip #3:
How can I get my JavaScript "Exit" button to work when I am in a browser plug in?
This problem occurs because the "Application.Quit" method, used to close the Brio document from within EIS, has no effect on a web browser plug-in.
First, create a command button called "Exit" that contains the following code:
if (Application.Name != "BrioQuery"
&& Application.Name != "BrioQuery Explorer")
{
var MyURL = "CloseSelf.html";
Application.OpenURL(MyURL,"_self")
}
else
Application.Quit(true)
It is important to check which Brio product the user is running. If it is standalone (Brio Designer, Brio Explorer), simple call Application.Quit. If not, open a web page (this name will need to be fully qualified to point to the server where the file is located) that contains the following code:
and save the file as "CloseSelf.html":
Example 1: Example 2:
<HTML>
<HTML>
<BODY
onLoad="self.close()">
<SCRIPT LANGUAGE=JavaScript>
</BODY>
self.close();
</HTML>
</SCRIPT>
</HTML>
Your web browser will open the HTML page and close the browser session.
Copyright © Hairsine Associates, 219 Rainbow Drive PMB 11917, Livingston, TX 77399. All Rights Reserved.
Return to Tips and Tricks Home Page click here...