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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:23

Top of page menu item in scrolling menu?


Poster: RMH
Dated: Sunday November 12 2006 - 9:26:59 GMT

I put a "Top" in the scrolling menu.
The #top works fine in IE but the menu item is dead in Firefox.
Reloading the page to get to the top seems nuts.
Does anyone have a suggestion.
Thanks

Here is the relevant menu.data.js info. it's the 4th aI

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
followscroll=1;
left=15;
orientation="verticle";
style=menuStyle;
top=20;
aI("text=Home;url=index.htm;");
aI("showmenu=Menu;text=Menu;");
aI("showmenu=Search;text=Search;url=search.htm;");
aI("text=Top;url=index.htm#top;");


Poster: Ruth
Dated: Sunday November 12 2006 - 9:42:37 GMT

Hi,

Try using

Code: Select all

aI("text=TOP;url=#top;");


You shouldn't need the page since it will just go to the top of whichever page it's on. That worked in FF1.0.5 and 1.5.08

Ruth

#Top doesn't work in Firefox on Scrolling Menu


Poster: RMH
Dated: Sunday November 12 2006 - 21:43:09 GMT

Thanks Ruth,

That works fine in IE using the same menu.data.js file for all pages.
I still does not work in Firefox ver 1.5.0.8. I cleared the cache and anything else I could think of in Firefox.
Just in case my eyes are missing something...
Here is the current state of the menu.data.js file: and the page head info is below that.

Thanks!

--------------------------------------------------------------------------------
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(menuStyle=new mm_style()){
bordercolor="#D7C786";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#000000";
offcolor="#FFFFFF";
onbgcolor="#D7C786";
oncolor="#000000";
outfilter="randomdissolve(duration=0.4)";
overfilter="Fade(duration=0.3);Alpha(opacity=88);Shadow(color=#777777', Direction=135, Strength=5)";
padding=5;
pagebgcolor="#000000";
pagecolor="";
separatorcolor="#D7C786";
separatorsize=1;
subimage="img/arrow_w.gif";
onsubimage="img/arrow_b.gif"
subimagepadding=2;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
followscroll=1;
left=15;
orientation="verticle";
style=menuStyle;
top=20;
aI("text=Home;url=index.htm;");
aI("showmenu=Menu;text=Menu;");
aI("showmenu=Search;text=Search;url=index.htm;");
aI("text=Top;url=#top;");
}

with(milonic=new menuname("Menu")){
overflow="scroll";
style=menuStyle;
aI("text=What We Do;url=about.htm;")
aI("text=Contact Us;url=contact.htm;")
aI("text=Tours;url=index.htm;")
aI("text=Travel Resources;url=index.htm;")
aI("text=Site Links;url=index.htm;")
aI("text=Related Links;url=index.htm;")
aI("text=Educational;url=index.htm;")
aI("text=E-News;url=index.htm;")
aI("text=AFH Club;url=index.htm;")
}

with(milonic=new menuname("Search")){
margin=3;
style=menuStyle;
top="offset=2";
aI("text=`<FORM METHOD=GET ACTION=/search.php name=search style='margin:0px;'><table><tr><td class=backW>Search AFH</td></tr><tr><td class=backW><input name=q size=11></td></tr><tr><td><input type=submit value=Search></td></tr></table></form>`;type=form;align=center;onbgcolor=;onborder=;");
}

drawMenus();

----------------------------------------------------------
Here is the state of the page head:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Arias For Humanity-Identifying & Supporting Young Talent With Scholastic & Artistic
Opportunity in Opera & the Theater Arts </title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="description" content="Arias For Humanity.Elegant,premium gala & benefit tours benefiting Opera & the Arts education & increased community arts access" />
<meta name="keywords" content="Performing Arts Tours,Visual Arts Tours,Architectural Tours,Archeological Tours,Cultural Tours,Historical Tours,Culinary Tours,Leadership Seminars,Premium Travel,Premium Tours" />
<link rel="icon" href="favicon.ico" type="image/ico" />
<link rel="shortcut icon" href="img/note.ico" />
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://www.milonic.com/">DHTML Menu / JavaScript Menu Powered by Milonic</a></noscript>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="map_world/menu_data.js"></script>
<script>
function givingpop(){
var givingpop="givingpop.htm"
winpops=window.open(givingpop,"",'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=765,height=300,left=90,top=180,')}
</script>

</head>


Poster: Ruth
Dated: Monday November 13 2006 - 2:01:45 GMT

Hi,

I don't understand why it's not working, it is working for me in both my FF browsers [even works in Firebird .07]

Can you put that on one of your test pages so I can try it there, perhaps it has something to do with that, because it seems to be working fine for me.

Ruth


Poster: RMH
Dated: Monday November 13 2006 - 2:11:40 GMT

Good idea. Let's see if either of the pages work out of my box here. http://www.ariasforhumanity.org
The scroll menu is on 2 test pages. the initial index page and under "menu" the "who we are" page.


Poster: Ruth
Dated: Monday November 13 2006 - 2:46:10 GMT

Hmm, well it doesn't work for me either and I found out why :!:

FireFox will not read that expression and know that it means go to the top, it wants an <a name='top'> to go to, however there is a function which I can't test because I'm not on the web.

Perhaps you can figure how to do this instead of having to put top in all your pages.

In html the link would be

Code: Select all

<a href="#top" onclick="self.scrollTo(0, 0); return false;">Top</a>
Now, I'm not sure how to do that in the menu. I think maybe you could use url='javascript: and however you'd code that into it, but I am not sure. :( I can try and play around with it and see.

Ruth


Poster: Ruth
Dated: Monday November 13 2006 - 3:15:27 GMT

Hi,

Try this, not sure if it will work on the web, though it works on my desktop

Code: Select all

aI("text=top;url=javascript:self.scrollTo(0, 0);");


I left out the return false because I have no idea how to get it in since it has to follow a semi-colon in the function.

Ruth


Poster: RMH
Dated: Monday November 13 2006 - 3:53:43 GMT

Bingo and thank you Rurh! You are the best. That little ditty deserves a hooray.
I think that "top" should be an obvious and standard menu item in a following-scrolling menu.
Now I will move on to see if I can figure how to get the menu placement at mid verticle screen and to maintain that posistion as you scroll down or up. For example I adjusted the intial top placement to 350px which puts it right where I want it but once you get to that 350px as you scroll down the menu starts following from that point but then stays at the top of the screen rather than maintain the middle verticle screen position.
cheers..


Poster: RMH
Dated: Monday November 13 2006 - 4:07:10 GMT

the mid screen position placement works on the milonic sample at
http://www.milonic.com/menusample10.php
when I change "top start position in pixels" to 300 it maintains that posistion as you scroll down but I do not see those corresponding value adjusters in the menu_data.js file.


Poster: Ruth
Dated: Monday November 13 2006 - 5:36:41 GMT

Hi,

Can you tell me exactly what it is you are trying to do as regards the menu? Are you trying to place it someplace lower down the screen and then when scrolling happens to keep it at that position? If that's what you want can you give me the figures for the original placement, please.

Ruth


Poster: RMH
Dated: Monday November 13 2006 - 6:41:12 GMT

Hi again,

I appreciate your check back.

I wanted to see how it looked if the menu was fixed mid screen vertically as you scroll down.
That would put it at about 380 px from the top at page load. The problem I'm having is keeping it at 380 px from the top as you srcoll down rather than at the top of the screen.

I am also working on the map. The map is in an Iframe.
For example when you point to USA and then click on USA Tours I want it to open in a new window not within the Iframe. Here is the aI that does not work as it opens in the Iframe.

aI("text=USA TOURS;url=../tours_usa.htm;")

cheers..


Poster: RMH
Dated: Monday November 13 2006 - 8:44:47 GMT

I have the map straightened out. I just pulled it out of the iframe.
Thnx