Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:28

Screen Position with a new Window using percentages


Poster: MikieMouse
Dated: Sunday June 15 2003 - 18:02:26 BST

I am able to use the screen position options without issue, though I can only get them to work with an exact value. For those that view the site on different display ranges, I was wondering if it is possible to set it to go down and right a certain percentage (to keep continuity). This is how I'm using the code:
Code:
,"Main Book","javascript:openNewWindow(\"www.site.com\",650,300,\"top=10,left=10,scrollbars=yes\")",,"Description",0

Any help would be great. Thanx :mrgreen:


Poster: kevin3442
Dated: Tuesday June 17 2003 - 0:58:01 BST

Dear Mr. Mouse,

There are no native javascript positioning functions that use percentages. You'd have to alter your openNewWindow() function to get the user's current screen size, then calculate the absolute pixel positions for top and left based on the percentages you are interested in. You'll have to be more than passingly conversant with javascript to do this. You might also find some premade scripts that use percentages on some of the various javascript sites out there.

Hope that helps,

Kevin