www.uburst.com www.uburst.com

"Popup box positioning"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Configuration Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Popup box positioning"
Posted by Kyle Baker on Jul-30-01 at 11:44 AM (EST)
Could someone point me in the right direction to find out more about how to change where the popup boxes in uReserve are positioned? Users have complained that when they click on a resource to add a reservation, the box that pops up appears on the lower right with the bottom half cut off of the screen. Is there a way to force the popup to appear centered, so that no matter the screen resolution it would always be in the center?...

Thanks in advance for any advice you could give.

Kyle Baker
Webmaster
LA County Office of AIDS Programs and Policy

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Popup box positioning, Bill Weiner, Aug-01-01, (1)
RE: Popup box positioning, Kyle Baker, Aug-02-01, (2)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Popup box positioning"
Posted by Bill Weiner on Aug-01-01 at 06:54 AM (EST)
To popup the reservation window, uReserve uses the standard JavaScript window.open call with the following "features" settings:

height=400,width=420,dependent=0,fullscreen=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0

I'm not aware of any feature to center the window... but there are some features to specify the X and Y locations of the window. They are:

For Netscape: "screenX" and "screenY"
For IE: "left" and "top"

So you could technically edit the "ureserve.pl" script and add some coordinates in there. Here's how:

STEP 1: Make a backup of your current ureserve.pl script... just in case.

STEP 2: Open your ureserve.pl script in any text editor such as WordPad.

STEP 3: Do a search on the following text:

ONCLICK=\"window.open

(There will actually be two occurances... but you will just be interested in the first occurance).

STEP 4: On that line with the first window.open, you will see where the "features" are set to:

height=$reserve_window_height1,width=435,dependent=0,fullscreen=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0

Just add the new features in there like this:

height=$reserve_window_height1,width=435,dependent=0,fullscreen=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0,screenX=50,screenY=50,left=50,top=50

(I just used 50 in this example...so that the window will always be positioned at the coordinates 50,50...which should at least show up on all screen resolutions).

STEP 5: Save the script (as TEXT if your editor asks)... and try it out!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "RE: Popup box positioning"
Posted by Kyle Baker on Aug-02-01 at 12:22 PM (EST)
That did the trick. Now no matter the screen resolution of a user, the popup appears in the center of the screen.

Thanks, as always, for your prompt and insightful help.

Kyle Baker
Web Master
LA County OAPP

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.