You can
use a Pop-up window code generator, such as the ones at http://javascript.internet.com/generators/popup-window.html
to save yourself some typing (and also save yourself from having to memorize how
the code goes).
- Put the main part of the JavaScript in the HEAD (using the HTML view in FrontPage):
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=450,left = 450,top = 350');");
}
// End -->
</script>
- Note if you copy from this web page to paste into the Page view in FrontPage, you will probably have to clean up the HTML so that the correct characters are in the HTML
- If you didn't use the pop-up window code generator, modify the code above to match the pages you're working on:
- toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1
(0 = "no" = "I don't want that element" || 1 = "yes" = "I do want that element")
This is where you specify which browser elements you want to be
part of the pop-up window. This example creates a new (pop-up)
window without the browser toolbar, directory bar,
status bar or menu bar. But, it creates a pop-up window that has
scrollbars and that the user can resize. It's highly recommended
that you make pop-up windows that have scrollbars and that are
resizable, to add to your user's convenience when viewing your
pop-up window.
- width=500
This is the number of pixels wide (horizontally) you want the pop-up window to be.
- height=450
This is the number of pixels high (vertically) you want the pop-up window to be.
- left = 450,top = 350
This is the number of pixels from the left side and from the top that the upper left corner of the window should be located at.
- Put the following script where you want the link to be. This is the link that will open a pop-up window:
- <a href="javascript:popUp('index.html')">CLICK HERE</a>
- Change the 'index.html' to the URL of the page you want to open in the pop-up window:
- popupsample.html (file in the same directory/folder as this page)
- ../popupsample.html (file in the directory/folder that's above this page)
- http://www.uta.edu/library/howto/popupsample.html (file that's on a different web server)
- Change the "CLICK HERE" to whatever text you want to appear as the link.
- Try it out: CLICK HERE
- And, that's all there is to it!
UTA Libraries Online
Send comments to: libraryweb@uta.edu
Box 19497 - University of Texas at Arlington - Arlington, Texas - 76019 - (817) 272-3000
Last Modified:
Thursday, 08-Aug-2002 15:10:12 CDT
Copyright © UTA Libraries