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

Menu item without specifying url?


Poster: Wade
Dated: Thursday November 29 2007 - 20:39:53 GMT

Hello,

I'm new to web design (a little lost...) - sorry if this post is a little crazy...

I want to create a web site using one of your menus. I see typically that most menus (including yours) point to url's which I would take you to an entirely new "page".

I'm envisioning one "page" (header, main body, and footer). The "main body" would have "default content". Then, by selecting a menu item, the "main body" would have different "content" - by specifying different "div" tags in each menu item.

Is this possible? Are there examples?

Thanx, Wade

Re: Menu item without specifying url?


Poster: Ruth
Dated: Friday November 30 2007 - 9:00:56 GMT

Hi,

The only way I know to do that is to put an iframe inside the div. Here's an example page. You will also need to create a page1.htm which is the original page that is in the iframe and a page2.htm which is the one that will be loaded when you click the item to load the page in the div's iframe. I put padding on the div and a border, and also an frameborder so that these would show when viewed.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script type="text/javascript" src="milonic_src.js"></script>   
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>
   
<script>
function openIFrame(iFrameId,winURL)
{
   ifId=gmobj(iFrameId)
   ifId.src=winURL
}
</script>
<div id="layer1" style="position:absolute; left:110px; top:50px; width:600px; height:200px; z-index:1;padding:4px;border:1px solid red"><iframe id=tempiframe name=tempiframe width="100%" height='100%' frameborder=1 src="page1.htm"></iframe></div>
</body>
</html>


Add this item to your menu_data file to test the page load in the iframe.

Code:
aI("text=Load page into div's iframe;url=page2.htm;target=tempiframe;");


I know there are methods to load a div, js functions I believe, and also I think ajax does it, but I think that might also use js functions or an iframe. But, don't take it to the bank, what I know about js would fit on the head of a pin :)

There is also something called a div loader that you can check here Some of the things at this site require a license purchase. I believe this item is free as long as you post their notice as creator. Again, I don't know that this will load a page. I believe it's only content.

Ruth

Re: Menu item without specifying url?


Poster: Ruth
Dated: Saturday December 1 2007 - 6:06:52 GMT

I just thought of something else you can do. You could create divs and set up a function to show hide them using the menu to do it. That way you could show different content from a click on the menu, however, you can't load an html page into a div, as far as I know.

Ruth