popup = window.open("pop.html", "popup_id", "scrollbars,resizable,width=300,height=400");'popu p' is the variable used to store the ID of the created popup. Get this value when opening a popup if you want to control it later. window.open()The code that opens the popup"pop.html"The first argument(pop.html) is the name of the file to be opened in the newly created window. Click here to open the file a new window."popup_id"The ID of the newly created popup - this can be used to access the popup latter in the script.OptionsThe final argument is a comma separated list of options. In our case it is...
scrollbars,resizable,width=300,height=400
Which means..
scrollbarsThe created popup will have scrollbars. These options can be given in the format scrollbars=yes or scrollbars=no. But I just used the short version.resizableThe popup will be resizable.widthThe width of the newly created popup in pixalsheightThe height of the popup
popup = window.open("pop.html", "popup_id", "scrollbars,resizable,width=300,height=400");
this is the code hope it helps
Last edited by chrishirst; 11-05-2008 at 03:07 PM..
Reason: merged 3 posts
|