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:35

Reload Menu


Poster: bobwill
Dated: Thursday January 16 2003 - 15:59:17 GMT

I have a horizontal menu that is set to be a scrollable menu. When ever one of my menu items links to another domain and I use the browser "BACK" key to return to my domain, the menu will not work unless I do a "Reload". The menu is froze at its last position on the screen.

Is there a way for me "Reload" the page automatically when you link to another domain and then return??


Poster: kevin3442
Dated: Monday January 20 2003 - 18:52:16 GMT

Hi Bob,

I've never tried it, but I suppose you could check the domain of the referrer, and if it's not the same as your domain, reload the page.

I wonder, however, if there's something else going on that could be causing the problem. Got a URL you can post?

Kevin


Poster: bobwill
Dated: Tuesday January 21 2003 - 4:42:15 GMT

Check it out here. http://www.baseball.legion.org/newsite/ Go to the main menu "Links" and then go to "Baseball Hall of Fame" and then use the "Back" on your browser and see if the menu functions correctly.


Poster: John
Dated: Tuesday January 21 2003 - 21:50:35 GMT

Bob -

Tried what you asked and all works well. Also tried it with the menu in different positions down the page. No problems at all. IE 6.0.28 and Netscape 7.01/XP.

If it's still messing up on your end you might want to try adding a target="_new" (or target="_blank") to your off-domain URLs. No more back button, and also keeps folks on your site while they're out looking around.


Poster: kevin3442
Dated: Wednesday January 22 2003 - 0:05:28 GMT

Hi Bob,

I checked it out also. Everything worked fine in IE6, NS7, and NS4.75 in Win2k. BUT, it did as you said (got stuck) in Opera 6.05. I have no idea why... maybe another Opera-related problem? Determining that would take some more testing. What browser/os are you using?

You could, perhaps, download the latest mmenu.js (3.5.11) and see if that helps (but that seems like a long shot). Also, John's suggestion of opening urls to other domains in a new window seems worth considering.

You new site is coming along nicely!

Kevin


Poster: bobwill
Dated: Wednesday January 22 2003 - 13:40:15 GMT

I am using Windows 98 and running Milonic menu version 3.5.10

I tried adding the "target=", but I cannot get it to work.

I get an error that the URL does not exist.

This is what I added.

,"Baseball Hall of Fame","http://www.baseballhalloffame.org/ target=_new",,,1
,"Baseball Hall of Fame","http://www.baseballhalloffame.org/ target=_blank",,,1

I even tired the sample at the following location and when you click on the "Google" sample it does not work.

http://www.milonic.co.uk/menu/menusampl ... ampleid=16


What is the correct syntax?


Poster: John
Dated: Wednesday January 22 2003 - 13:57:21 GMT

Sorry 'bout that, Bob. The old habits of hand-coding HTML as opposed to JS.

This...
Code:
,"Baseball Hall of Fame","http://www.baseballhalloffame.org/ target=_new",,,1

...should be this...
Code:
,"Baseball Hall of Fame","http://www.baseballhalloffame.org/ target=\'_new\'",,,1

Since the URL is already enclosed in double quotes you can't add another set, so you have to use single quotes around _new, but those quotes need to be escaped, hence the backslash (\). That finally gives you, within your already double-quoted URL, target=\'_new\'. Same would apply, of course, for _blank or whatever.

Given the description of the fix in 3.5.11, I don't think that will help your problem. However, Kevin's point is valid - it's always (usually?) best to keep up with the latest version.

Jeez, it's too early over here for this :!:


Poster: bobwill
Dated: Wednesday January 22 2003 - 14:05:41 GMT

I figured it out. You need a space or blank after the URL address

,"Baseball Hall of Fame","http://www.baseballhalloffame.org/ target=_blank",,,1

If your URL address also contains the actual "HTML" file, then you need to put a semi-colon on the end of the "target"

,"ALB Web Sites","http://members.tripod.com/~Post_119_Gulfport_MS/amlbbnet.html target=_blank;",,"Department Web Sites",1

I am did not try your suggestion with the quotes, but I am sure it will work. The above seems to work for me. Beginners Luck.

Thanks for your help.


Poster: John
Dated: Wednesday January 22 2003 - 14:14:19 GMT

Interesting. Just tried it and it does work your way. Not sure which is "correct", but what the hay.

In the original code I quoted from your post you do have a space between the URL and 'target', so that statement has me confused (easy to do anyway).