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: Wednesday July 18 2012 - 06:07:17

Using Frames, submenu link description non-functional.


Poster: pest
Dated: Friday November 15 2002 - 21:22:00 GMT

I am using version: 3.3.19

I am using a three frame page, head, nav and main.
When I add target=main my descriptive text for the
link disappears and IE6 and NS7 complain of errors
on the page. I'd like to be able to use both the descriptive
text and the fames. Any ideas?

addmenu(menu=["examples",
,,113,1,"",style1,,"left","randomdissolve(duration=0.5);Shadow(color='#ffffff', Direction=135, Strength=5)",0,,,,,,,,,,,
,"FAQ db","examples/db_faq/index.html target=main",,"An Excellent FAQ db example.",1
,"Ticket Tracking db","examples/db_tt/index.html",,"Super Performing Ticket Tracking db",1
,"Sales Calls db","examples/db_sc/index.html",,"Never Forget or Lose A Sale Again",1
])

===============================================


Poster: trytrix
Dated: Friday November 15 2002 - 22:25:44 GMT

Hi,

Some things are easier to understand if they can be seen..

Cheers,
Trytrix

To be seen ..


Poster: pest
Dated: Saturday November 16 2002 - 3:26:58 GMT

A three frame page:

<html>
<head>
<title>A Three Frame Page</title>

<script LANGUAGE="Javascript">
<!--
top.location.target="_top"
if(window.location.target!="_top"){
top.location.href=window.location.href
}
//-->
</script>

</head>

<frameset rows="15%,18%,*" border="0" noresize>
<frame name="head" src="head.html" scrolling=no>
<frame name="nav" src="nav.html" scrolling=no>
<frame name="main" src="main.html" scrolling=auto>
</frameset>

<noframes>using frames</noframes>

</html>

The menu is in the nav frame and the submenu links point to main menu.

"something-or-other.html target=main"

.. or like I posted earlier ...

addmenu(menu=["examples",
,,113,1,"",style1,,"left","randomdissolve(duration=0.5);Shadow(color='#ffffff', Direction=135, Strength=5)",0,,,,,,,,,,,
,"FAQ db","examples/db_faq/index.html target=main",,"Example of a FAQ db",1
,"Ticket Tracking db","examples/db_tt/index.html",,"Example of a Super Power Ticket Tracking db",1
,"Sales Calls db","examples/db_sc/index.html",,"Never Forget or Lose A Sale Again",1
])


if you don't understand .. it's OK .. neither do I. :-) I'm just following the instruction on the FAQ page regarding targeting frames.

Pest


Poster: trytrix
Dated: Saturday November 16 2002 - 7:42:18 GMT

Hi,

You forgot the "sourceframe=" after the 'target=main;" !
Code:
,"FAQ db","examples/db_faq/index.html target=main;sourceframe=main",,"Example of a FAQ db",1

Cheers,
Trytrix

RE:


Poster: pest
Dated: Sunday November 17 2002 - 2:01:54 GMT

Thanks. I appreciate it. We'll see if it works.

On another note, the frame targeting example in the FAQ pages here on this website doesn't show a [;sourceframe=the_target+frame.html] anywhere. A tremendous pile of agrivation could have been avoided if the frame targeting instructions in the distribution and the FAQ section of this website held that information. Golly, I could have had a working demo for myself yesterday. Out of frustration I used a different, plain old html, setup. Now I'm going to have to start over. If it works .. I pay money for the license. If not .. then I guess I'll just keep seaching ... down that long lonesome trail ...

Once again thank you very much. :-)

pest


Poster: kevin3442
Dated: Sunday November 17 2002 - 5:25:53 GMT

pest wrote:
...the frame targeting example in the FAQ pages here on this website doesn't show a [;sourceframe=the_target+frame.html] anywhere. A tremendous pile of agrivation could have been avoided...

If I may be so bold as to add a few things:

First, just to be sure anyone who is interested is clear on the use of the target and sourceframe settings... The syntax from the above quote, ";sourceframe=the_target+frame.html", implies that sourceframe indicates the name of an html document to load. Not so. The sourceframe is the name of a frame, not a document. Here's how I think of it... sourceframe specifies the name of the frame containing the document where the menu you want to open is defined; target specifies the name of the frame where you want the called menu to appear. Like so:
Code:
,"Languages","show-menu=languages target=main;sourceframe=main",,"#",1

In the above example, target=main indicates that we want to open the "Languages" submenu in the frame named main (named so in your frameset); sourceframe=main indicates that the javascript menu array, for the menu named languages, is contained within the document in the frame named main. It isn't as complicated as it may seem at first. According to the advice on the frames example page, "...you need to add the menu_body code to every page that will be loaded into your main frame." If you follow this advice, then the document you intend to display in a frame will also contain the .js code for the menu that you want to display in that frame. This makes it simpler in practical terms, because the target and sourceframe will normally be set to the same frame name (just as in the code example above).

Second, in defense of the excellent examples on the milonic.com site, the frames example does, in fact, illustrate the use of both target and sourceframe; it has for quite some time (at least since I used it to figure out how to use the menus with frames). These illustrations appear in the example code that you can download from the example page, as well as in the .js files that define both the header menu and the side menu used on the example page itself. The snippet of code that you see above was copied directly from the examples you can download from the frames page. Not trying to stir something up... just wanting to make sure the facts are clear. :)

Two last points, specifically for pest... (1) You mentioned that you were using v3.3.19. That was one of the earliest frames versions, from April, 2002. There have been several additions or bug fixes specific to frames since then. If you want, you can get the latest version here. (2) You might also want to check out the Frames_Top_Offset and Frames_Left_Offset values that you'll see at the top of the variuos xxx_array.js files used in the frames examples. These may be necessary to offset the position of your submenus, to make sure they line up properly with the main menu's calling item.

Regards,

Kevin