Stand Alone Popup

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Stand Alone Popup

Post 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?
basdog22
Forum Contributor
Posts: 158
Joined: Sun Nov 30, 2003 3:03 pm
Location: Greece

Post by basdog22 »

maybe with an onload statement???

/me not good with javascript :wink:
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
net7
Forum Commoner
Posts: 31
Joined: Wed Mar 12, 2003 1:27 pm

Post by net7 »

I know how to move it, and resize it. I just can't remove the address bar :/
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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>
Post Reply