[Javascript] focus() not working in NN6

ecentofa at att.net ecentofa at att.net
Tue Nov 6 18:15:51 CST 2001


Hello,

I'm trying to find some insight into why this code does
not work in NN6. This code is the event handler for an 
href tag. When I click the link, the new window opens 
and the correct URL loads, but then the original window 
gets the focus almost immediately. If I comment out the 
newWindow.focus() line, the new window is displayed for 
a few seconds longer, but it still loses focus.

Thanks for any insights you can provide.

-eileen

code:

function intercept(idx,urlstring,newwindowname)
{



document.links[idx].target = "";
document.links[idx].href=self.location + 
self.location.hash;


    	   newWindow = window.open
(urlstring,"","height=400,width=400,scrollbars,resizable"
);
		   newWindow.name = newwindowname;
		   newWindow.focus();
		  
		   	  
	
}



More information about the Javascript mailing list