I have a button click and in it i put a javascript function to open a new window and if i again click the button the same window refresh again and point to it.Working both in firefox and chrome.but not in IE.Here is the code i tried
<button onclick="popitup('http://www.google.com');">click</button>
var newwindow = null;
function popitup(url) {
if ((newwindow == null) || (newwindow.closed)) {
newwindow = window.open(url, 'Buy', 'width=950,height=650,scrollbars=yes,resizable=yes');
newwindow.focus();
} else {
newwindow.location.href = url;
newwindow.focus();
}
}
IE return newwindow==null all the time...that is the issue...any solution?