I have a Div data which is coming dynamically. I want to open that div data in popup after some event fired. I am done with my code. But when popup is opening in my browser its not centered aligned.. Its coming in corner..
My code :-
var w = 620;
var h = 360;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var divText = document.getElementById("inviteConfirmationMessage").outerHTML;
var myWindow = window.open('','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
var doc = myWindow.document;
doc.open();
doc.write(divText);
doc.close();
Working in Mozilla firefox but not working in Chrome --
Please help me out !! or any guidance.