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: Saturday July 14 2012 - 06:07:13

Submenus reposition to far left after using back button


Poster: jwoolley
Dated: Saturday August 28 2004 - 16:04:35 BST

Hi,
I have a horizontal main menu with sub menus which display perfectly and work perfectly until I use the back button in the browser.

After I use the back button, the sub menus appear over on the far left of the screen.

Sorry I have no URL as the site is in development. I using Version 5.42 using the Static Images type menu.

I have looked in the forums but couldn't find anyone else with this problem. Can anyone help?

Thanks!


Poster: Ruth
Dated: Saturday August 28 2004 - 17:20:56 BST

Could you let us know which browser and OS? If you mouseover a second time do the submenus appear where they are supposed to be? Is there a way for you to post the two pages in a test format, is the menu in a table or absolute positioned? Also there's a new update, so you should probably get it, keeping a copy of the version you now have, just in case.

Ruth


Poster: jwoolley
Dated: Monday August 30 2004 - 13:08:04 BST

OS is XP sp1, browser is IE 6.0.28.

If I mouse over the sub menu a second time it still appears on the very left hand side of the screen. If I refresh the browser the submenu appears where its suppose to. Then I use the back button and submenu displays on far left again.

The menu is absolute positioned. But the script calls to the menus appear within a table tag but not in a TR or TD tag.

I can't figure out how to post you my menu code or example pages so I'm pasting code snips below. My web site is built using LANSA software so we are using a web server config which maps directories etc, making posting a proper example pretty difficult.


Menu call from within page - I commented out the old menu call using an old version of milonic....maybe this is part of the problem?

Code:
<!-- WEBSKEL Table 2 -->
<TABLE WIDTH="750" CELLSPACING="0" CELLPADDING="0" BORDER="0" ALIGN="CENTER"
VALIGN="TOP">
<TR>
<TD ALIGN="CENTER" COLSPAN="2" VALIGN=TOP WIDTH="100%">
<!--CRMWBHDR-->
<!-- <SCRIPT language=JavaScript src="/javascript/mmenu.js" type=text/javascript></SCRIPT> -->


<script type="text/javascript" src="javascript/milonic_src.js"></script>   
   <script   type="text/javascript">
       if(ns4)_d.write("<script language=JavaScript src=javascript/mmenuns4.js><\/script>");      
        else _d.write("<script language=JavaScript src=javascript/mmenudom.js><\/script>");
   </script>
<SCRIPT language=JavaScript src="javascript/top_not_logged_in_array.js" type=text/javascript></SCRIPT>





<!--Header Art Work-->
<!--CRMARTCRM-->
<!--CRM Art Work-->
<TABLE WIDTH=750 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
   <TD><IMG SRC="/images/crm/default_01.jpg" ></TD>
</TR>



Part of the Menu Code with first submenu top_not_logged_in_array.js



_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_subOffsetTop=5               // Sub menu top offset
_subOffsetLeft=-10            // Sub menu left offset

with(menuStyle1=new mm_style()){
onbgcolor="#FFFFFF";
oncolor="#FF4500";
offbgcolor="#FFFFFF";
offcolor="#19338f";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
separatorcolor="#FFFFFF";
separatorsize="0";
padding=2;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana,Arial,Times";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
}


with(menuStyle2=new mm_style()){
onbgcolor="#FFFFFF";
oncolor="#FF4500";
offbgcolor="#FFFFFF";
offcolor="#19338f";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
separatorcolor="#FFFFFF";
separatorsize="0";
padding=3;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana,Arial,Times";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/javascript/nav_arrow.jpg";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color='#777777', Direction=135, Strength=5)";
}


with(menuStyle3=new mm_style()){  //Style for Second Logged in Menus, first level
onbgcolor="#FFFFFF";
oncolor="#FF4500";
offbgcolor="#FFFFFF";
offcolor="#4d4dff";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
separatorcolor="#FFFFFF";
separatorsize="0";
padding=2;
fontsize="75%";
fontstyle="normal";
fontweight='bold';
fontfamily="Verdana,Arial,Times";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
}


with(menuStyle4=new mm_style()){  //Style for Second Logged in Menus, 2nd level, has submenu images
onbgcolor="#FFFFFF";
oncolor="#FF4500";
offbgcolor="#FFFFFF";
offcolor="#4d4dff";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=0;
separatorcolor="#FFFFFF";
separatorsize="0";
padding=2;
fontsize="75%";
fontstyle="normal";
fontweight='bold';
fontfamily="Verdana,Arial,Times";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/javascript/nav_arrow.jpg";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color='#777777', Direction=135, Strength=5)";
}




with(milonic=new menuname("Main Menu")){
style=menuStyle1;
top=120;
left=0;
alwaysvisible=1;
orientation="horizontal";
screenposition="center";
aI("url=javascript:MainDSPHandleEvent(\"CRMWEB01\"\,\"FWEB001\"\,\"\");status=Go To Home Page;image=/javascript/nav_01.jpg;overimage=/javascript/nav_01-over.jpg;");
aI("showmenu=business;status=Business Products offered by The Argus Group;image=/javascript/nav_02.jpg;overimage=/javascript/nav_02-over.jpg;");
aI("showmenu=personal;status=Personal Products offered by The Argus Group;image=/javascript/nav_03.jpg;overimage=/javascript/nav_03-over.jpg;");
aI("text=Quotes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/quotes\"\,\"quotes\"\,\"htm\");status=Quotes;image=/javascript/nav_arrow.jpg;");
aI("showmenu=about;status=About Argus;image=/javascript/nav_04.jpg;overimage=/javascript/nav_04-over.jpg;");
aI("showmenu=forms;status=Forms;image=/javascript/nav_06.jpg;overimage=/javascript/nav_06-over.jpg;");
aI("showmenu=contact;status=Contact Argus;image=/javascript/nav_07.jpg;overimage=/javascript/nav_07-over.jpg;");

}

with(milonic=new menuname("business")){
style=menuStyle2;
aI("text=Group Health;showmenu=group_health;status=Group Health;");
aI("text=Pensions;showmenu=pensions;status=Pensions;");
aI("text=Life;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"life\"\,\"htm\");status=Life;");
aI("text=Long Term Disability;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"ltd\"\,\"htm\");status=Long Term Disability;");
aI("text=Workmen's Compensation;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"work_comp\"\,\"htm\");status=Workmen's Compensation;");
aI("text=Short Term Disability;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"short_term\"\,\"htm\");status=Short Term Disability;");
aI("text=Group Accident;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"group_acc\"\,\"htm\");status=Group Accident;");
aI("text=Commercial Property;showmenu=comprop;status=Commercial Property;");
aI("text=Commercial Vehicle;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"com_veh\"\,\"htm\");status=Commercial Vehicle;");
aI("text=Contractors All Risks;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"cont_all_risk\"\,\"htm\");status=Contractors All Risks;");
aI("text=Liability;showmenu=liab;status=Liability;");
aI("text=Marine Cargo;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"marine\"\,\"htm\");status=Marine Cargo;");
aI("text=Professional Risks;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"prof_risk\"\,\"htm\");status=Professional Risks;");
aI("text=Travel;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"travel\"\,\"htm\");status=Travel;");
aI("text=Insurance and Financial Glossary;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\/business\"\,\"glossary\"\,\"htm\");status=Insurance and Financial Glossary;");
aI("text=Frequently Asked Questions;showmenu=bus_faq;status=Frequently Asked Questions;");
aI("text=Benefit Document Test - DELETE ME;url=javascript:StaticHandleEvent(\"CRMWEB01\"\,\"FWEB005\"\,\"\/ssi\"\,\"benefit_test\"\,\"htm\");status=Benefit Document Test - DELETE ME;");
}


Poster: Ruth
Dated: Monday August 30 2004 - 18:35:33 BST

We've got the code and can play with it. While I play around, you need to get the calls for the menu out of the table and eliminate that old call. In version 3 there was a thing about 'placemenu' for putting it in a table, but that doesn't exist in version 5, on top of which you are not putting the menu in a table [which uses a whole different procedure] you are absolutely positioning it. Put the calls either in the head section of the page or immediately after the opening body tag. See if that fixes the problem [not sure it will].

Ruth


Poster: Andy
Dated: Tuesday August 31 2004 - 9:06:58 BST

Hi,

I've just tried the code and it seems fine.

The only thing can suggest is that the problem is being caused somewhere else on the page. What Ruth suggests sounds like it might fix the problem though.

The menu is being built before the table has been completed, thus putting it in the wrong position.

For more testing though, we'll really need to see this in action, so a URL for a sample page will be needed.

Cheers
Andy