DSGN53871
WEB DESIGN 1
POPUP WINDOW JAVASCRIPT SAMPLES
This link calls a JavaScript custom function called myWindow that recieves the URL, width and height and uses the open() method of the Window object. Note the focus() method to give the window focus. See the JavaScript open() method for more window properties like whether it has menu bars, etc. Note, if you just want to pop up a new browser window you do not need JavaScript - just put a target=newWindow or some unique name in the link.
In the text box below is the code less the script tags (or view source):
Pop up a dimensioned window
Here is how to pop up a centered window - we call a second function myCenter():
Pop up a centered window
Here is how to pop up a maximized window (not full screen):
Pop up a maximized window
To move a window to a specific location on the screen.
Pop up a dimensioned window, then move to a location.
Sheridan - School of Applied Computing and Engineering Sciences - Web Technologies
|