»
EnglishFrenchVietnamese

Print - Window Open method - JavaScriptBank.com

Full version: jsB@nk » Browser » Window » Window Open method
URL: https://www.javascriptbank.com/window-open-method.html

Window Open method © JavaScriptBank.comThis tiny script will open as many winodws as you choose to whatever site you choose.

Full version: jsB@nk » Browser » Window » Window Open method
URL: https://www.javascriptbank.com/window-open-method.html



JavaScript
<SCRIPT language=JAVASCRIPT><!--  hide        //--------------------------------------------------    // Copyright Reaz Hoque, 1996, All right reserved       // This code can be used for non-profit use only if     // the copyright notice is kept.        //---------------------------------------------------function customize(form) {            var address = document.form1.url.value;           var op_tool  = (document.form1.tool.checked== true)  ? 1 : 0;            var op_loc_box  = (document.form1.loc_box.checked == true)  ? 1 : 0;            var op_dir  = (document.form1.dir.checked == true)  ? 1 : 0;            var op_stat  = (document.form1.stat.checked == true)  ? 1 : 0;            var op_menu  = (document.form1.menu.checked == true)  ? 1 : 0;            var op_scroll  = (document.form1.scroll.checked == true)  ? 1 : 0;            var op_resize  = (document.form1.resize.checked == true)  ? 1 : 0;            var op_wid  = document.form1.wid.value;           var op_heigh = document.form1.heigh.value;                         var option = "toolbar="+ op_tool +",location="+ op_loc_box +",directories="+ op_dir +",status="+ op_stat +",menubar="+ op_menu +",scrollbars="+ op_scroll +",resizeable="+ op_resize+",width="+ op_wid +",height="+ op_heigh;        var win3 = window.open("", "what_I_want", option);          var win4 = window.open(address, "what_I_want");}function clear(form){         document.form1.wid.value="";         document.form1.heigh.value="";}// done hiding --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM action=javascript: method=post name=form1><TABLE border=1 cellPadding=5>  <TBODY>  <TR>    <TD><PRE><center><b>Open a web page with options</b></center><INPUT name=url size=30 value=/index.htm>: URL<INPUT name=tool type=checkbox value="ON">: Toolbar<INPUT name=loc_box type=checkbox value="ON">: Location<INPUT name=dir type=checkbox value="ON">: Directories<INPUT name=stat type=checkbox value="ON">: Status<INPUT name=menu type=checkbox value="ON">: Menubar<INPUT name=scroll type=checkbox value="ON">: Scrollbars<INPUT name=resize type=checkbox value="ON">: Resizable<INPUT name=wid value=500 size="20">: Width<INPUT name=heigh value=200 size="20">: Height<BR><CENTER><INPUT onclick=customize(this.form) size=10 type=button value=" ENTER "><INPUT onclick=clear(this.form) size=10 type=reset value=" RESET "></PRE></CENTER></TD></TR></TBODY></TABLE></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->