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 link question-newbie


Poster: Arby
Dated: Saturday November 19 2005 - 15:38:55 GMT

Hello all,
The person responsible for creating my nascent website left me high and dry, and I was wondering if anyone can tell me a way to send a link to the Milonic menu that will open up the specific Iframes that the menu references? For instance, I have a menu item titled "China-Tableware"
Here is the code:

with(milonic=new menuname("Home")){
style=menuStyle;
aI("text=China-Tableware;url=javascript:openIFrame('content_area','china.html');openIFrame('Nav_content_area','navbar_china.html');");
}

In effect, I need the Milonic menu to open china.html and navbar_china.html in their respective Iframes.

I apologize if this is an Iframe issue and not a Milonic issue, but I was hoping there was a "quick and easy" way of doing this that my ex-developer neglected to mention. TIA

Arby


Poster: Ruth
Dated: Saturday November 19 2005 - 15:52:15 GMT

Hi Arby,

What you want is the the _loadMultiFrames() function that was created by Kevin for a user of the menu.

Load Multi Frames/Iframes Demo

If you need more help, just post back here.

Ruth


Poster: Arby
Dated: Saturday November 19 2005 - 16:06:10 GMT

Ruth,
Thank you for the prompt reply. This solution rids me of part of the problem, but the other issue is being able to create a link to this entire page with the frames loaded. I guess what I am asking is if there is a tag or other such marker that I could paste in a link so that I could send the "China_tableware" link and have it open that page? As I mentioned, at this point, I don't know if it is a Milonic resolution, an Iframes resolution, or a javascript resolution, but I truly appreciate your help. In addition, I apologize if I am not being clear..this terminology is new to me and I am trying to learn months of information in a few days.

Arby


Poster: Ruth
Dated: Saturday November 19 2005 - 18:38:25 GMT

Hi Arby,

You need to provide a page and explain what link you want me to click and what you want to load when I do.

I'm not sure what you are asking. Do you have a site layout made of iframes, or frames or something else?

I know it's hard when you don't have the terminology to explain, I still have that problem a lot :?

Ruth


Poster: Arby
Dated: Saturday November 19 2005 - 19:06:54 GMT

Hi Ruth,
I greatly appreciate your patience. Here is a link to a page:

http://www.saleadvantage.com/SA/Content/menu/index.htm

If you go to the menu item "Home" and then select "China-Tableware", you will see how the pages have been setup. Is there a way for me to link directly to this page? Thanks again.

Arby


Poster: Ruth
Dated: Saturday November 19 2005 - 20:47:38 GMT

Hi Arby,

OK, I've looked at the page. You have a table with 2 columns and 3 rows,
and two iframes on in the right bottom and one in the left bottom column.

Exactly which page do you want to open? Right now you are opening two pages, one in the right iframe called navbar_china and in the left the china page.

Are you trying to get rid of the iframes? and just open pages?

Ruth


Poster: Arby
Dated: Sunday November 20 2005 - 2:45:34 GMT

Ruth,
nav_bar china and china.html basically consitute 1 page for my purposes..I would like to be able to send a link that would open the page as you see it when you click on the "china-tableware" menu, i.e., open both frames, plus the milonic menu itself. It may not be possible with the page in its current form, I fear. Thanks.


Poster: Ruth
Dated: Sunday November 20 2005 - 3:30:17 GMT

Hi,

I really feel kind of dumb. I am not understanding at all what you want. You are already opening the two pages into the two iframes and the menu is still on the page when you click the china-tableware link in the menu.

When you say send a link are you saying you want to be able to send someone a link in an email or something that when it is clicked they will get the site as it is after you have clicked on the china-tableware link in the menu, with those two pages loaded?

I really apologize but for some reason I'm just not understanding :oops:

Ruth


Poster: Arby
Dated: Sunday November 20 2005 - 3:50:21 GMT

Ruth wrote:



When you say send a link are you saying you want to be able to send someone a link in an email or something that when it is clicked they will get the site as it is after you have clicked on the china-tableware link in the menu, with those two pages loaded?



Yes! That's it exactly!


Poster: Ruth
Dated: Sunday November 20 2005 - 17:26:17 GMT

Hi,

Basically, since I'm a basic level person, the answer is no. I'm sure there must be some way to send some kind of link using some kind of advanced javascript function that would do that, but I think that would have to be pretty involved since it would have to address all the links you might send by email making sure each link had it's particular setup in the function.

That said, I do have a solution. It's not too involved though it does require making 10 separate pages...that's based on the number of main menu items excluding the Home for the index page of the site. And, actually you only need to make one page and save it under each name changing the src of the iframes. So, let's take your china-tableware that you've been using. You'd take your index.htm page you have now, change the iframe pages to the navbar_china.html and china.html, and save it as home_access.html

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>SaleAdvantage</TITLE>
<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<STYLE type=text/css>BODY {
   BORDER-TOP: 0px; FONT-SIZE: 12px; OVERFLOW: auto; BORDER-LEFT: 0px; BOTTOM: auto; FONT-FAMILY: verdana; BACKGROUND-COLOR: #ffffff
}
.backG {
   FONT-SIZE: 12px; COLOR: #ffffff; BORDER-BOTTOM: #538c4d 2px solid; FONT-FAMILY: verdana; BACKGROUND-COLOR: #93c39b
}
TD.form1 {
   FONT-SIZE: 12px; BACKGROUND: #eaeaea; FONT-FAMILY: verdana
}
.style1 {
   FONT-SIZE: 10px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY><!--
    Milonic DHTML Website Navigation Menu Version 5.0+
    Copyright 2005 (c) Milonic Solutions Limited (UK). All Rights Reserved.
    Please visit http://www.milonic.com/ for more information.

    Although this software may have been freely downloaded, you must obtain a license before using it in any production environment.      
    The free use of this menu is only available for Non-Profit, Educational & Personal Web Sites who have obtained a license to use.
   
    Free, Commercial and Corporate Licenses are available from our website.
    You also need to include a link back to http://www.milonic.com/ if you use the free license.
   
    All Copyright notices MUST remain in place at ALL times.
    This includes the first three lines of this notice on every page that uses the menu.
    If you cannot comply with all of the above requirements, please contact us to arrange a license waiver.
--><!--   ***** This is the section of code you need to paste into your web page *****-->
<SCRIPT src="milonic_src.js" type=text/javascript></SCRIPT>
<A class=milonic href="http://www.milonic.com/">JavaScript Menu, DHTML Menu
Powered By Milonic</A>
<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 src="menu_data_test.js" type=text/javascript></SCRIPT>

<SCRIPT>
function openIFrame(iFrameId,winURL)
{
   ifId=gmobj(iFrameId)
   ifId.src=winURL
}

</SCRIPT>

<DIV>
<TABLE height="100%" width="100%" border=1 bordercolor=red>
  <TBODY>
  <TR>
    <TD vAlign=top align=left bgColor=#09730c colSpan=2 height=50>
      <TABLE height="100%" width="100%" bgColor=#09730c border=1 bordercolor="aqua">
        <TBODY>
        <TR>
          <TD width="79%" bgColor=#006600><font color="#ff6666">header?</font><IMG height=22
            src="SA3.gif" width=167></TD>
          <TD width="21%" bgColor=#006600><font color="#ff6666">header?</font>
            <DIV align=right><SPAN class=style1><A target=content_area
            href="https://app.quicksizzle.com//survey.aspx?sfid=3324">Sales
            Notification </A></SPAN></DIV></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD colSpan=2 height=40>aaa&nbsp;</TD></TR>
  <TR>
    <TD width="20%" height="90%"><IFRAME id=Nav_content_area marginWidth=0
      marginHeight=0 src="navbar_china.html" frameBorder=1 width="100%"
      height="100%"></IFRAME></TD>
    <TD width="80%" height="90%"><IFRAME id=content_area marginWidth=0
      marginHeight=0 src="china.html" frameBorder=1 width="100%" scrolling=yes
      height="100%"></IFRAME></TD></TR></TBODY></TABLE></DIV></BODY></HTML>


Now, in your menu_data.js file make these changes and then save it as menu_data_test.js so it doesn't overwrite your existing menu_data.js working file. You'll note that on the page I posted above it uses menu_data_test.js as the file.

Make the headerbgcolor and headercolor the following:
Code:
headerbgcolor="#ffffff";
headercolor="#82B6D7";


Add this to the Home menu
Code:
aI("text=Home Accessories;separatorsize=2;separatorcolor=#82B6D7;pagematch=home_access.html;type=header;");


You need to have the extra aI as a header in order to have a pagematch so when anyone clicks the link you send them when they arrive the correct pages are loaded and also the main menu item that goes with that section is highlighted.

You can change the headercolors to what you want, take out the separator in that aI string if you don't want it, that's just a personal thing with me to set off the header section.

OK. Now you have a page to which you can send a link, since the iframe names are the same and everything else is the same, the same menu_data file will work just as they do now. You'd need to 'save' the same page, with the appropriate changes as each one of the main items. So, you'd have women.html, men.html, baby.html, kids.html and so on, just make sure you set the correct iframe src pages for each one and add a header item, making the pagematch part = the name of the page you are creating, so for women it would be
Code:
aI(text=Women's Items;separatorsize=2;separatorcolor=#82B6D7;pagematch=women.html;type=header;");


When you send a link, you'd send it for these pages you created and when they got to the site, the main item would be highligted and any link clicked would do what it does now, and if they clicked on the Home, i.e. for your home page, I'm assuming that will take them to what is now your test index page, they will have what looks to be the exact same site.

Hope this helps. If you need more info, just post back.

Ruth