New User? Need help? Click here to register for free! Registering removes the advertisements.

Computer Cops
image image image image image image image image
Donations
If you found this site helpful, please donate to help keep it online
Don't want to use PayPal? Try our physical address
image
Prime Choice
· Head Lines
· Advisories (All)
· Dnld of the Week!
· CCSP News Ltrs
· Find a Cure!

· Ian T's (AR 23)
· Marcia's (CO8)
· Bill G's (CO12)
· Paul's (AR 5)
· Robin's (AR 2)

· Ian T's Archive
· Marcia's Archive
· Bill G's Archive
· Paul's Archive
· Robin's Archive
image
Security Central
· Home
· Wireless
· Bookmarks
· CLSID
· Columbia
· Community
· Downloads
· Encyclopedia
· Feedback (send)
· Forums
· Gallery
· Giveaways
· HijackThis
· Journal
· Members List
· My Downloads
· PremChat
· Premium
· Private Messages
· Proxomitron
· Quizz
· RegChat
· Reviews
· Google Search
· Sections
· Software
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top
· Topics
· Web Links
· Your Account
image
CCSP Toolkit
· Email Virus Scan
· UDP Port Scanner
· TCP Port Scanner
· Trojan TCP Scan
· Reveal Your IP
· Algorithms
· Whois
· nmap port scanner
· IPs Banned [?]
image
Survey
How much can you give to keep Computer Cops online?

$10 up to $25 per year?
$25 up to $50 per year?
$10 up to $25 per month?
$25 up to $50 per month?
More than $50 per year?
More than $50 per month?
One time only?
Other (please comment)



Results
Polls

Votes: 1133
Comments: 21
image
Translate
English German French
Italian Portuguese Spanish
Chinese Greek Russian
image
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin 

window size/position...

 
Post new topic   Reply to topic       Computer Cops Forum Index -> Proxomitron General
View previous topic :: View next topic  
Author Message
ProxFox

Sergeant
Sergeant



Joined: Nov 11, 2003
Posts: 110
Location: USA

PostPosted: Mon Apr 26, 2004 3:06 pm    Post subject: window size/position...
Reply with quote

Is there any way to convert a given link that normally opens up into a smaller window into a link that opens up the smaller window but CENTERS it? Or for me to "define" the new windows relative position?


edit: nevermind... I found a way... Pogo opens up a smaller window when entering into a game room... There's a .js file on the page that calls the new window... I've filtered that to change some variables so that the game room window is now centere... Man!, I love Proxo!!!
Back to top
View users profile Send private message
ProxFox

Sergeant
Sergeant



Joined: Nov 11, 2003
Posts: 110
Location: USA

PostPosted: Wed Apr 28, 2004 8:47 am    Post subject: centering a wanted pop-up...
Reply with quote

Looks like I still need help with this one...
Below is the .js file...

Code:
<!-- js used to launch game popup window -->


var xSizes = new Object();
var ySizes = new Object();

var userSizeStr;
var useOffset = "true";

function setSize(size, type, x, y)
{
   var str = size + type;
   xSizes[str] = x;
   ySizes[str] = y;
}

function setUserSize(size, offset)
{
   userSizeStr = size;
   useOffset = offset;
}

function goSize(url)
{
   var fullUrl = url + "&size=" + userSizeStr;
   
   window.location.replace(fullUrl);
}

function openPopup(url, type)
{
   var sSmall = "s" + type;
   var sLarge = "l" + type;
   
   openPopupOfSize(url, type, xSizes[sSmall], ySizes[sSmall], xSizes[sLarge], ySizes[sLarge]);
}

function openPopupOfSize(url, type, xSmall, ySmall, xLarge, yLarge)
{
   var fullUrl = url + "&size=" + userSizeStr + "&type=" + type;
   var str = userSizeStr + type;
   var x = xLarge;
   var y = yLarge;
   if (userSizeStr == "s") {
      x = xSmall;
      y = ySmall;
   }
   var offset = 20;
   if (screen.width <= 820 || useOffset == "false") {
      offset = 0;
   }

   var winorn = "width="+x+",height="+y+",status=no,scrollbars=no,screenX="+offset+",screenY="+offset+",top="+offset+",left="+offset+",resizable=no";

   win = window.open(fullUrl, "Game", winorn);
   win.opener = window;
}


Any suggestions on what needs modified so that the resulting pop-up game window is CENTERED on a 1024x768 screen?
Back to top
View users profile Send private message
sidki3003

Corporal
Corporal



Joined: May 11, 2002
Posts: 53
Location: Germany

PostPosted: Wed Apr 28, 2004 9:13 am    Post subject:
Reply with quote

Code:
   var offset = 20;
   if (screen.width <= 820 || useOffset == "false") {
      offset = 0;
   }

Did you already try (removing that if construct and then) playing with the offset var?
Back to top
View users profile Send private message
ProxFox

Sergeant
Sergeant



Joined: Nov 11, 2003
Posts: 110
Location: USA

PostPosted: Wed Apr 28, 2004 10:10 am    Post subject: var...
Reply with quote

That was the exact point I was suspecting...

I tried two things...

First, my filter modified the "offset = 20" into "offset = 200" - nothing changed in the positioning of the popup...

Second, my filter modified the "offset = 0" into "offset = 200" - again, no change...


So then I changed the "+offset+" sections...
Namely, the screenX= and left=, still didn't seem to change anything...


Cache was cleared after each change...
And "SourceTree" was used to verify that my filter was making the changes to the .js file...

I'm not sure what's going on...
My end-in-mind is to get the Pogo game room (chess is the only one I play) to open up in the center of my screen... And for the game itself, opened from within the game room, to also be centered...
Back to top
View users profile Send private message
sidki3003

Corporal
Corporal



Joined: May 11, 2002
Posts: 53
Location: Germany

PostPosted: Wed Apr 28, 2004 11:09 am    Post subject:
Reply with quote

So if you set winorn to, say "width=200,height=200,screenX=200,screenY=200,top=200,left=200", nothing changes? That would be odd.

I can't go there without signing up which i don't want.
Back to top
View users profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       Computer Cops Forum Index -> Proxomitron General All times are GMT - 5 Hours
Page 1 of 1

 
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2.0.8a © 2001 phpBB Group

Version 2.0.6 of PHP-Nuke Port by Tom Nitzschner © 2002 www.toms-home.com
Version 2.2 by Paul Laudanski © 2003-2004 Computer Cops