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: Wednesday July 18 2012 - 06:07:44
Menu Positioning
Poster: michael.manion __at__ fmr.com
Dated: Wednesday March 20 2002 - 12:33:23 GMT
I'm attempting to use your menu within a JavaScript template layout structure (all HTML layout code is in document.write files - header, footer, etc.). I need my menu to render where ever I place it in the HTML(via doc.write), relatively positioned, not absolutely positioned. I read a forum thread regarding something simlar, however this does not work in my situation.
I've tried:
document.write('<SCRIPT language=JavaScript src="scripts/menu_array.js" type=text/javascript><\/SCRIPT>');
document.write('<SCRIPT language=JavaScript src="scripts/mmenu.js" type=text/javascript><\/SCRIPT>');
document.write('<script language=JavaScript>PlaceMenu("mainmenu")<\/script>');
...within my HTML layout doc.write file. In IE the menu appears in the body of my document, but nowhere near the location my HTML layout doc.write file is defining.
In NS I get a "e10 is not defined" error.
I hope I've made myself clear.
Thanks for a great menu!!!
Regards,
Mike
Re: menu positioning
Poster: yadin
Dated: Wednesday February 27 2002 - 20:28:36 GMT
You can not set the width to a percentage if that is what you are asking. I suggest setting the width of your menu to about 750/#menus so that in horizontal mode on a 600x800 screen it about covers the top of the page. Then set the alignment to center so on wider screens it is at least centered on the page.
Hope this helps,
Yadin
Re: menu positioning
Poster: GregM __at__ insightcargo.com
Dated: Wednesday February 27 2002 - 21:23:45 GMT
Yadin, thanks for the response, but which file do i set the menu width in. menu array.js or mmenu.js
thanks again for you help
Re: menu positioning
Poster: yadin
Dated: Wednesday February 27 2002 - 21:35:55 GMT
All configuration is done in the array file, you should never touch the mmenu.js file unless you're looking to re-program the applet. The array file has all the lines commented to help you in customization.
Re: menu positioning
Poster: Willy
Dated: Thursday August 8 2002 - 13:59:51 BST
yadin wrote:
You can not set the width to a percentage if that is what you are asking. I suggest setting the width of your menu to about 750/#menus so that in horizontal mode on a 600x800 screen it about covers the top of the page. Then set the alignment to center so on wider screens it is at least centered on the page.
Hope this helps,
Yadin
Hope this helps,
Yadin
And so maybe you know how to fix that. I'm using SSI pages with an exact size table centered on the screen for all the pages, so i added a fixed horizontal menu perfectly but then i wanted to add a second vertical follow-the-scrolling menu in a specific position within the page that varies according to the screen resolution. There's an example in http://www.sportingdevallecas.es/noticias.shtml
Re: menu positioning
Poster: Willy
Dated: Wednesday August 14 2002 - 13:00:04 BST
Willy wrote:
And so maybe you know how to fix that. I'm using SSI pages with an exact size table centered on the screen for all the pages, so i added a fixed horizontal menu perfectly but then i wanted to add a second vertical follow-the-scrolling menu in a specific position within the page that varies according to the screen resolution. There's an example in http://www.sportingdevallecas.es/noticias.shtml
And as nobody helped i finally found a solution by myself which is to use some JavaScript code inside, like
Code:
addmenu(menu=["menuname",160,(screen.width-770)/2,130,,,style...
Just in case anyone was looking for it,
Willy.