I have a function opening a new window, attached to a button:
<button onclick="newWin()">New Window</button>
This works fine but just the first time it is clicked. Following times, even when the opened window has been closed, I have this error:
TypeError: newWin is not a function
This is the JS function:
function newWin() {
newWindow= window.open('pan/newWin.html', 'Nueva ventana', 'toolbar=yes,location=no,resizable=no,width=600,height=820');}
newWindow=...and notnewWin=...? can you provide jsfiddle?