Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-24-2001, 04:55 PM   #1
DuffyStark
Registered User
 
Join Date: May 2001
Location: Milan, Italy
Posts: 4
Question

Is it possible to set the "X" and "Y" of a pop up window made using a javascript? I'd like to put it wherever I want on the screen :-)
thanks
DuffyStark is offline   Reply With Quote
Old 05-24-2001, 10:34 PM   #2
mgb
New Member
 
Join Date: Jan 2001
Posts: 245
Default

Yes,

Put this in the head section of the page that LAUNCHES the popup:
<TITLE>centWin</TITLE>
<script language="JAVASCRIPT" type="TEXT/JAVASCRIPT"><!--
if(screen){
topPos=0
leftPos=0
}
function getPage(thePage,wt,ht){
leftPos= (screen.width-wt)/2
topPos = (screen.height-ht)/2
newWin1 = window.open(thePage,'aWin','toolbars=no,resizeable =no,scrollbars=no,left='+leftPos+',top='+topPos+', width='+wt+',height='+ht)
}
// -->
</script>
</HEAD>

And for the Flash button: GetURL("javascript:getPage('yourfilename.html',500 ,400)")

now you can change topPos and leftPos to whatever you like...

~mgb
mgb is offline   Reply With Quote
Old 05-25-2001, 09:17 AM   #3
DuffyStark
Registered User
 
Join Date: May 2001
Location: Milan, Italy
Posts: 4
Default

Thank you,
now I'm a little less confused...
see you for the next problem!
DuffyStark is offline   Reply With Quote
Old 05-25-2001, 05:19 PM   #4
mgb
New Member
 
Join Date: Jan 2001
Posts: 245
Default

You're welcome.

~mgb
mgb is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial for Launching a Centered Pop-Up Window vazbo ActionScript 1.0 (and below) 9 01-01-2010 11:01 PM
Browser Pop up window scripts Nicidemus ActionScript 1.0 (and below) 2 11-12-2003 02:00 PM
Problem in pop up window. NovNov ActionScript 1.0 (and below) 3 07-11-2003 03:25 AM
Pop up window from another pop up window ecwashere7 ActionScript 1.0 (and below) 1 01-09-2002 09:37 PM
Close/Open new pop up window bcmuth ActionScript 1.0 (and below) 3 06-25-2001 02:16 AM


All times are GMT. The time now is 05:39 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.