Cross Browser Window – Open In Javascript

Now a days, browser dependent scripts like javascript create problems due to the varieties of clients and versions of different browsers. So, the programmers or the web developers should be alert to implement such scripts on web. The scripts should be necessarily cross browser compatible …..

Check the simple function….

var myPopupWindow = ”;
function openPopupWindow(url)
//If it is already open
if (!myPopupWindow.closed && myPopupWindow.location)
myPopupWindow.location.href = encodeURI(url);
myPopupWindow=,name, “location=no, scrollbars=yes, resizable=yes, toolbar=no, menubar=no, width=” + width + “, height=600,top=250,left=150″);
if (!myPopupWindow.opener) myPopupWindow.opener = self;
//If my main window has focus – set it to the popup
if (window.focus) {myPopupWindow.focus()}

The web programmer can never ignore the importance of cross browser applications as the browsers of the individuals are completely obscured from the programmer at the time of programming.