very simple question..
what is the syntax used to access a window by its name?
say my code looks like this:
[code]
function openNewWindow(winName){
newWindow = window.open(”,winName,’width=450,height=300,resizable=yes,scrollbars=no,toolbars=no,top=50,left=100′);
content = “<html><head>”;
content += “<script src=’js.js’></script>”;
content += “</head>”;
content += “<body><a href=’javascript:;’ onclick=’editWindow(“”+newWindow+””)’>edit my window</a></body>”;
content += “</html>”;
newWindow.document.write(content);
newWindow.document.close();
}
function editWindow(newWindow) inside js.js receives newWindow as a window object but when I try to do
newWindow.focus() inside js.js, it says newWindow.focus() is not a function?