function popupaddpackage(urlToOpen){
var window_width = screen.availWidth/2;
var window_height = screen.availHeight;
var window_left = (screen.availWidth/2)-(window_width/2);
var window_top = (screen.availHeight/2)-(window_height/2);
var winParms = "Status=yes" + ",resizable=yes" + ",height="+window_height+",width="+window_width + ",left="+window_left+",top="+window_top;
var newwindow = window.open(urlToOpen,'_blank',winParms);
newwindow.focus();
}
<a href="" onclick="popupaddpackage('popupchange.jsp?extkey=<%=extKey%>&classId=<%=classid%>')">OPEN POPUP</a>
I use this js function to open pop up screen in my jsp, and this works normally in Chrome but in IE doesn’t work normally. In Chrome – pop up screen opens and the page behind remains stable, but in IE – pop up screen opens and the page behind redirects to index.jsp (the page behind is property.jsp). How to solve it?
Please, launch JS pop-ups the right way and the problem should be gone.
In your case, it would be something like:
And for the HTML:
That way, you: