Page 1 of 1

Stand Alone Popup

Posted: Mon Jan 12, 2004 12:08 am
by net7
Ok, what I am trying to make is a popup box be the result of clicking on a basic link, with no javascript whatsoever in the first page. I want to have the popup resize itself, and center itself on the screen, and not have the Address Bar or buttons included on it. Is this possible to contain all of this code in the popup itself?

Posted: Mon Jan 12, 2004 2:02 am
by basdog22
maybe with an onload statement???

/me not good with javascript :wink:

Posted: Mon Jan 12, 2004 6:59 am
by JayBird
i know you can resize and move a window when it loads, i'm not sure that you can remove the button and URL bar.

Code: Select all

<script language="JavaScript">
            
    windowWidth=1024;
    windowHeight=768;
    if (parseInt(navigator.appVersion) >= 4) window.moveTo((screen.width/2)-(windowWidth/2+10),(screen.height/2)-(windowHeight/2+20));
</script>
Mark

Posted: Mon Jan 12, 2004 8:30 pm
by net7
I know how to move it, and resize it. I just can't remove the address bar :/

Posted: Mon Jan 12, 2004 10:33 pm
by Gen-ik
Settting up how the window is displayed can only be done when it's launched... it can't change it's own settings (menubar, location etc) once it's been opened.

Code: Select all

<script type="text/javascript">

window.open("page.php", "myPage", "left=0, top=0, width=100, height=100, menubar=0, location=0, status=0, resizeable=no, scrolling=0, toolbar=0");

</script>