Quote:
Originally Posted by xenoche
Thanks for responding. But the whole point is for the user to HAVE the option to select multiple links, I need it to launch all the links selected by the user.
|
What, all at once?
Code:
<form name= "myform">
Google <input type = "checkbox" name = "chk1">
Coding Forums <input type = "checkbox" name = "chk2">
JavaScriptKit <input type = "checkbox" name = "chk3">
<br><br>
<input type = "button" name = "but1" value = "Launch selected URLs" onclick = "go()">
</form>
<script type = "text/javascript">
function go() {
if (document.myform.chk1.checked == true) {window.open("http://www.google.com","window1")}
if (document.myform.chk2.checked == true) {window.open("http://www.codingforums.com","window2")}
if (document.myform.chk3.checked == true) {window.open ("http://www.javascriptkit.com","window3")}
}
</script>
You can add attributes to each window, such as width, height, resizable, scrollbars, toolbar etc.
Example:-
if (document.myform.chk1.checked == true) {window.open("http://www.google.com","window1",'width=800,height=600,scrollbars=yes,resizable=no,toolbar=yes')}