> Javascript Programming... I need new window to open when checkbox is clicked. Otherwise, the links must load on the same

Javascript Programming... I need new window to open when checkbox is clicked. Otherwise, the links must load on the same

Posted at: 2014-12-18 
Here's how I would do it:

1) Attach an onclick handler to all your links.

2) In your winOPEN() method, check if the checkbox was checked. If so, get the value from the link and open it in a new window.

Here's the fix: http://pastebin.com/cgxmbwfG

Read the comments.

In programming, you have to write things correctly or else it will not work. For example,

- document.getElementById NOT document.getElementID

- document.getElementById() accepts only one argument

- html files always has a tag

Also, know that modern browsers will NOT open popup windows. Instead they will open them in a new tab. IE might still though I am not sure.











Check this to open in a new window



GOOGLE


YAHOO


COMCAST


MSN