HOW TO: Programmatically Open a Web Page in a New Window Using FrontPage 2000 (265316)
The information in this article applies to:
This article was previously published under Q265316 SUMMARY
This article illustrates the script required to open a Web page in a new window 30 seconds after it has been loaded in the current browser window.
back to the top
Open a Web Page Programmatically
To open a Web page in a new window following a programmed delay (for example, 30 seconds after being loaded in the current browser window), follow these steps:
- Type the following script between the <HEAD> tags (on the HTML tab) of the Microsoft FrontPage 2000 web, and then edit the Uniform Resource Locator (URL) parameter to point to the Web page to be opened:
NOTE: You may receive an error message if you copy and paste this script directly from this article to FrontPage. The angle brackets ("<" and ">") may appear as XML code ("<" and ">"). To work around this behavior, paste the script in a blank Notepad document, and then copy it from Notepad before pasting it into FrontPage.
<SCRIPT LANGUAGE="JavaScript">
<!--
function wait()
{//this function is called by the BODY onLoad event
//calls the launch() function
//and sends it the URL parameter after 30 seconds
//edit the URL parameter to point to the web page to be opened
setTimeout("launch('http://www.MyWeb.com/SomePage.htm')", 30 * 1000);}
function launch(URL)
{//this function is called by the wait() function
self.name = "opener";
//opens another browser window to the specified URL parameter
//new window opens to the specified size
remote = open(URL, "remote",
"resizable,scrollbars,width=550,height=150,left=50,top=50");}
// -->
</SCRIPT>
You can also set the parameters for the dimensions and location of the new window.
- Use the following <BODY> tag:
<BODY onLoad="wait()">
When you preview the page in a browser, a new window containing the page's elements will open after 30 seconds.
back to the top
Modification Type: | Major | Last Reviewed: | 10/27/2002 |
---|
Keywords: | kbhowto kbHOWTOmaster KB265316 |
---|
|