|
Donations |
|
|
|
|
|
If you found this site helpful, please donate to help keep it online
Don't want to use PayPal? Try our physical address
|
|
|
Survey |
|
|
|
|
|
|
|
|
Translate |
|
|
|
|
|
|
|
|
|
|
View previous topic :: View next topic |
Author |
Message |
ProxFox
Sergeant
Joined: Nov 11, 2003
Posts: 110
Location: USA
|
Posted: Mon Apr 26, 2004 3:06 pm Post subject: window size/position... |
|
|
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 |
|
|
ProxFox
Sergeant
Joined: Nov 11, 2003
Posts: 110
Location: USA
|
Posted: Wed Apr 28, 2004 8:47 am Post subject: centering a wanted pop-up... |
|
|
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 |
|
|
sidki3003
Corporal
Joined: May 11, 2002
Posts: 53
Location: Germany
|
Posted: Wed Apr 28, 2004 9:13 am Post subject: |
|
|
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 |
|
|
ProxFox
Sergeant
Joined: Nov 11, 2003
Posts: 110
Location: USA
|
Posted: Wed Apr 28, 2004 10:10 am Post subject: var... |
|
|
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 |
|
|
sidki3003
Corporal
Joined: May 11, 2002
Posts: 53
Location: Germany
|
Posted: Wed Apr 28, 2004 11:09 am Post subject: |
|
|
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 |
|
|
|
|
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
|