javascript - How to open a Popup window, so that it's height is from the top of the screen to the buttom? -



javascript - How to open a Popup window, so that it's height is from the top of the screen to the buttom? -

i trying open popup window, height top of screen "applications" bar of windows. code:

function windowopener(windowheight, windowwidth, windowname, windowuri) { var windowheight = window.innerheight ? window.innerheight : document.documentelement.clientheight ? document.documentelement.clientheight : document.body.clientheight; var centerwidth = (window.screen.width - windowwidth) / 2; var centerheight = (window.screen.height - windowheight) / 2; newwindow = window.open(windowuri, windowname, 'resizable=0,scrollbars=1,width=' + windowwidth + ',height=' + windowheight + ',left=' + centerwidth); newwindow.focus(); homecoming newwindow.name; }

why doesnt work in ie? (works in chrome)

thanks

i think need screen.width , screen.height. don't prepend them window.

edit: apparently ie requires "fullscreen=yes" param.

try this:

<script type="text/javascript"> <!-- function popup(url) { params = 'width='+screen.width; params += ', height='+screen.height; params += ', top=0, left=0' params += ', fullscreen=yes'; newwin=window.open(url,'windowname4', params); if (window.focus) {newwin.focus()} homecoming false; } // --> </script> <a href="javascript: void(0)" onclick="popup('popup.html')">fullscreen popup window</a>

javascript html css

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -