Menu problems with base=_blank

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
robertsclark
Beginner
Beginner
Posts: 5
Joined: Wed Jun 25, 2003 2:43 pm

Menu problems with base=_blank

Post by robertsclark »

Hi
I am trying to upgrade to version 5, and at the same time get rid of my frames-based navigation.

My main index page has <base target="_self"> and everything appears to work OK, but if I click on onw of the menu items nothing happens. My submenu pages have <base target="_blank">, as I want any links on those pages to open up in a new window. If I click a menu-item on one of the sub_menu pages that has target="_blank", I get a new window opening "javascript:void(0)".

How can I get this to work properly? If I click on the menu item it should take me to a particular page, whether I am running on a page that has target="_blank" or target="_self"

I have uploaded the problem pages to http://www.gotocayman.com/milv5/cayman.htm

Regards

Robert
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

To make menu items open up links in a new window, you need to use some javascript. Luckily the menu takes care of most of it for you, see this example... http://milonic.com/menusample.php?sampleid=11

Hope this helps.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
robertsclark
Beginner
Beginner
Posts: 5
Joined: Wed Jun 25, 2003 2:43 pm

Menu problems with base=_blank

Post by robertsclark »

Dave
I think you missed the point, it isn't the menu items that I want to open in a new windows.

My pages are full of links to external sites. To keep my page open for reference, I have <base target="_blank"> to force these links to open in a new window.

My main index page has <base target="_self">. If I click on the top menu item, nothing happens. On my sub pages that have <base target="_blank">, if I click on the top menu itmes then I get a new window opening with javascript:void(0).

Robert
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok I think I understand what you are saying. When I view the page in Safari, on your homepage, any of the menu links I click take me to a different page on your site in the same window. I didnt check them all, but the ones I did worked. Is there a link in particular in the menu? Then once at one of these other pages that contain lists of links, if I click of of those links, they all open up in a new window, which makes sense. And clicking on another menu link in the menu from one of these pages takes me to another page in your site in the main window, which sounds like the intended action.

Maybe it has something to do with the browser you are using. What OS and browser version are you using? And what links in particular are you referring to?
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
robertsclark
Beginner
Beginner
Posts: 5
Joined: Wed Jun 25, 2003 2:43 pm

Problem now resolved

Post by robertsclark »

Managed to fix the problem.

What was happening was that if I was on the main index page and clicked of a top-level menu-item (eg Accommodation), nothing happened. However if I was on another page and tried the same thing, I would get the javascript:void(0) message.

Managed to resolve my problem by adding to the aI entry in the datafile target=_self, which overrides the base instruction.

Regards

Robert
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Excellent job troubleshooting that. I was about to suggest such a thing, but i never fully grasped the problem as you can see. But excellent job again, and good luck using the Milonic menu!
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
robertsclark
Beginner
Beginner
Posts: 5
Joined: Wed Jun 25, 2003 2:43 pm

Why do I get two e-mails when a reply is posted?

Post by robertsclark »

It certainly is a useful facility, but for some reason I get two e-mail notifications!
Post Reply