Hi, im a newbie on javascript, i know you guys know this script. I would like to launch several sites with check box and a "Launch Site' button. I would like to put a check mark beside each sites that I would like to launch and click the "Launch Site' button to open each sites. Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Qwerty</title> <script type="text/javascript"> function siteOpener() { var checkboxArr=document.form1.CheckboxGroup1; for(var i=0;i<checkboxArr.length;i++) { if(checkboxArr[i].checked) { window.open (checkboxArr[i].value,"mywindow"+i); } } } </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <input type="checkbox" name="CheckboxGroup1" value="http://google.com" id="CheckboxGroup1_0" />Google <input type="checkbox" name="CheckboxGroup1" value="http://yahoo.com" id="CheckboxGroup1_1" />Yahoo <input name="openSites" type="button" value="Launch Site" onclick="siteOpener();"/> </form> </body> </html> PHP:
more button JavaScript codes you can find at http://www.javascriptbank.com/javascript/form/button/en/