The Javascript function that displays a popup window is listed below:
To use this funtion with HTML code use the following line:
Click to see a demo popup window
The code explained:
The function takes as parameters the url of the page displayed in the popup window, the window hight and the window width. The other window parameters are set inside the funtion:
- width - the width of the popup in pixels
- height - the height of the popup in pixels
- from_top - distance in pixels from the top of the screen to the top of the window
- from_left - distance in pixels from the left side of the screen to the left side of the window
- toolbar - if the tolbar should be shown. The toolbar contains the Back, forward buttons, etc. This parameter is not supported by Opera browsers.
- location - if the location bar is shown
- directories - if the directories bar is shown. This parametter is not supported in Opera, Safari and Explorer on Mac
- status - if the status bar is shown. Not supported in Opera (always no)
- menubar - if the menubar is shown. The menubar contains File, Edit, etc. Not supported in Opera (always no).
- scrollbars - if the popup should have scrollbars if it needed. This parameter is always yes in Explorer Mac, Safari and Opera, even if set to no.
- resizable - if the popup is resizable. The popup is always resizable in Mozilla, Safari and Opera.
The line that actualy creates the window is:
window.open(url,'win_name',atts);
The first parameter is the url of the page to be displayed. Second parameter is the window name and it can be any name you like. Third parameter gives the window attributes.
I hope it will work for u.
Best of luck
2007-02-01 16:23:22
·
answer #1
·
answered by cool _ sim 2
·
0⤊
0⤋
Resizing of windows dynamically is usually handled by Java script code. You can get Java script plug-ins that when added to your page's HTML adds more versatility to the pages. It also allows you to create pop-up windows to display photos and text. Try the link below. Good luck!
2007-02-01 16:20:29
·
answer #2
·
answered by Rowdy answers 6
·
0⤊
0⤋