PDA

View Full Version : Positioning pop up windows ??


wap3
10-11-2002, 02:49 PM
Hello

How can I position a pop up window on the screen, with regards to its position from the top and left of the screen ??

I tried adding various things to the following script but can't seem to get it to work. Can it be cross browser for netscape 6+ and i.e 5+

Thanks :thumbsup:

function newWin(url, width, height) {
var Win = window.open(url,"newWinw",'width=' + width + ',height=' + height + ',resize')
}

ksridhar69
10-11-2002, 03:31 PM
function checktherow()
{
sealWin=window.open("TEST.asp,'newwindow','height=450 width=650,toolbar=no,menubar=no,scrollbar=yes,status=yes,resizable=yes,location=no,alwaysRaised=true ,right=0,top=0');
self.name = "mainWin";
return false;

}


put right =0 or 100
and left =0 or 100

wap3
10-11-2002, 03:46 PM
Thanks mate

That works just fine :thumbsup:

WAP3

cg9com
10-11-2002, 04:17 PM
Originally posted by ksridhar69
alwaysRaised=true

?

beetle
10-11-2002, 05:06 PM
alwaysRaised

http://www.webreference.com/js/tutorial1/features.html#alwaysRaised

Not really necessary as far as I'm concerned (not to mention ignored altogether by IE)

Note: left and top should be used for best compatibility, and not right

wap3
10-11-2002, 05:52 PM
Ok, so this is what I have for opening my windows. How can I tell it that scrollbars should be used when necessary, i.e when the content is biggere that the window.

I have tried putting scrollbars=auto, but it doesn't seem to work.
How can I do this ??

function newWin(url, width, height) {
var Win = window.open(url,"newWinw",'width=' + width + ',height=' + height + ',resize,scrollbars=auto,toolbar=no,menubar=no,status=no,resizable=no,location=no,left=20,screenX=20 ,top=20,screenY=20')


Thanks :thumbsup:

beetle
10-11-2002, 07:05 PM
auto is a CSS value for the overflow property, and not a valid value here. Scrollbars on a window by their nature behave as auto does for overflow so just enable them by adding 'scrollbars=yes'

cg9com
10-11-2002, 08:02 PM
Originally posted by beetle

Not really necessary as far as I'm concerned (not to mention ignored altogether by IE)



thanks beetle