Click to See Complete Forum and Search --> : toolbar-menu ???? HELP HELP
crashdaraven
02-23-2003, 02:43 PM
Hi everyone,
i have found a need litle menu that i wanna use at;
http://javascript.internet.com/navigation/toolbar-menu.html
Only problem i have with it is that i want to chance the position of the menu en put it somewhere just above the absolute middle of a webpage.
I can not seem to figure out how to do it.
Any one has a glue ??
Please help me
You mean you want to make the menu that is at the top, in the middle of the page? And you want it to stay there?
crashdaraven
02-24-2003, 04:55 AM
Yes, thats exactly what i mean.
Have any idea`s ?
Let's see... <SPAN style="top:120px;"><script></script></SPAN>
Maybe that'll work. You can try editting the JavaScript instead, or adding, "position:absolute;" to the SPAN. The <script></script> is where you put your .js file. If you'd like me to, I can look and see if there's another way (probably is) by editting the JavaScript. Because older browsers (really older ones) don't support some CSS.
On second thought, that doesn't work... I'm pretty sure the only way to do it is to edit the menu.js file. It seems that the part you'll have to edit is in the one function that says the innerHeight and innerWidth [FrstLoc.innerHeight; and FrstLoc.innerWidth;]
crashdaraven
02-25-2003, 02:20 AM
Ok i think i have found the right lines.
Unfortunately i am a absolute script dummy.
Under here are the lines that you ment Right ?
Where can i give the coordinates to make the menu be placed somewhere else?
function RePos(){
FrstWinWdth=ExpYes?FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
ScWinWdth=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
ScWinHght=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
if(MenuCentered=='justify'&&FirstLineHorizontal){
FrstCntnr.style.width=FrstWinWdth;
ClcJus();
var P=FrstCntnr.FrstMbr,W=Menu1[5],i;
for(i=0;i<NoOffFirstLineMenus;i++){P.style.width=W;P=P.PrvMbr}}
StaticPos=-1;
if(TargetLoc)ClcTrgt();
if(MenuCentered)ClcLft();
if(MenuVerticalCentered)ClcTp();
PosMenu(FrstCntnr,StartTop,StartLeft)}
Last Thing;
As far as i can see the only way to place the menu somewhere else is to edit the javacode.
I have tryed to put it in a Table, didnt work.
I have tryed to put it in layer, didnt work.
Css would also not work.
A well, i hope you would have a good solution for me.
Thank you sofar for your time.
crashdaraven
02-25-2003, 03:13 PM
Have finaly found something to move the menu, the next lines give me the chance to move the menu to left, middle or right.
var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
So im close to what i need.
Is it possible to chance the code lines so that i can move the menu for example exactley between the left and the middle?
i would like to move exactley the menu to any position i like.
Hope you have a answer for me.
Under here are the lines that you ment Right ?
Where can i give the coordinates to make the menu be placed somewhere else?
function RePos(){
FrstWinWdth=ExpYes?FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
ScWinWdth=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
ScWinHght=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
if(MenuCentered=='justify'&&FirstLineHorizontal){
FrstCntnr.style.width=FrstWinWdth;
ClcJus();
var P=FrstCntnr.FrstMbr,W=Menu1[5],i;
for(i=0;i<NoOffFirstLineMenus;i++){P.style.width=W;P=P.PrvMbr}}
StaticPos=-1;
if(TargetLoc)ClcTrgt();
if(MenuCentered)ClcLft();
if(MenuVerticalCentered)ClcTp();
PosMenu(FrstCntnr,StartTop,StartLeft)}
Yep, that's it. Well, I tried changing it, but you may want to try changing, "FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;" to something like, "FrstWinHght=ExpYes?200px" or "FrstWinHght=ExpYes?top:200" or maybe even, "FrstWinHght=top:200" or "FrstWinHght=200px" Or something like that.. just a thought.
Unfortunately i am a absolute script dummy.
You're not the only one... :p
Have finaly found something to move the menu, the next lines give me the chance to move the menu to left, middle or right.
var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
So im close to what i need.
Is it possible to chance the code lines so that i can move the menu for example exactley between the left and the middle?
OK, since you can move the menu to center it, you just want it to stay in the center at all times? Hmm, well, that can probably be done. Try something like, "MenuVerticalCentered='top:200px;position:relative';" or something like that. If it doesn't work, you'll probably have to edit the "hard-code" part in the menu.js file and reprogram the part that sets the actual position--something quite difficult for even me, I might add.
voorheesj
02-25-2003, 07:25 PM
you need to edit the menu_var.js
the line is
var StartTop=1;
just change that number till you are where u want
crashdaraven
02-26-2003, 03:24 AM
Just tryied al the options, ANd didnt work :-(
Maybe i just did it wrong or so, but im not able to move the menu to anywhere specifick.
Im stuck here
voorheesj
02-26-2003, 05:03 AM
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
should be set to top
and
var StartTop=1;
set that number at around 70
I'm using the same menu, it will work
Hehe... I must not have looked very closely at the menu's code....
crashdaraven
02-27-2003, 03:48 AM
Yep your right it works :-)
Great, thanx
Your a genius.
Thanx to all people for helping out.
You have all been great
crashdaraven
02-28-2003, 02:53 AM
pffffffff think i had it good and then a new problem came;
Problem is that if i hit F11 (browser fullscreen) the menu moves to to the upper left corner.
After resizing to normal browser the menu stays in upper left corner.
Only after hitting refresh button the menu goes to the original position.
If i open the page in Full screen than the menu also doesnt have the right position.
It looks like ,the given coordinates position the menu according to the computer screen and not according to the webpage.