I was messing with the unsupported frames code and figured out how to use the function and everything, but what if your 'main' menu also had just a plain link in it, could you get it to open in a particular frame, like you have the submenus open, and if so how would you do that?
Ruth
Target if using frames
Hi Ruth,
Specify the target frame in the URL field of the menu item definition.
If I recall correctly, there's no need to specify the sourceframe unless the item is opening a submenu in a different frame, although with some builds, if you didn't put in a sourceframe anyway, like this
then the offbgcolor would remain.
Ummm... Should we move this to the v3 forum?
Cheers,
Kevin
Specify the target frame in the URL field of the menu item definition.
Code: Select all
,"Home","mainpage.htm target=main",,,1
Code: Select all
,"Home","mainpage.htm target=main;sourceframe=main",,,1
Ummm... Should we move this to the v3 forum?

Cheers,
Kevin
Hmm, no it's with version 5. I was playing with the function that Hergio threw together for all those who were asking about using 5 with frames to see what was up. It only refers to opening sub menus so I wondered how would you just open a link in that frame if one of your menu items didn't have a submenu but was only a direct link to a page.
Ruth
Ruth
Oh, I see. You even mentioned "unsupported frames code" although I could have sworn that it said "frames example". Oops.
Sorry.
I guess you'd just have to set the target property for that menu item to the name of the frame where you want the url to appear. For example, say the menu item was in your nav frame, and your content shows up in a frame named "main". Your menu item might look like so:
Haven't really played with v5 in frames, so this is just conjecture.
Kevin

I guess you'd just have to set the target property for that menu item to the name of the frame where you want the url to appear. For example, say the menu item was in your nav frame, and your content shows up in a frame named "main". Your menu item might look like so:
Code: Select all
aI("text=Home;url=mainpage.htm;target=main;");
Kevin
Hi Ruth,
In this case, there are two frames named "nav" and "body". The main menu would be loaded into the file called nav.htm, which is displayed in the "nav" frame. Main menu items that do not open submenus would set target=body to open pages in the "body" frame, like so:
In this case, we use target=body because that's the name given to the frame where we want to display the page. If that doesn't work for you, then there's more to the puzzle and I'm left wondering what browser/os you're using?
Cheers,
Kevin
Well now I found that odd. Seems like it ought to work, right? So you know what I had to do... Not being one to resist, I tried it myself. Only thing is... it worked in IE5/5.5/6, NS7.1, Moz1.2.1, and Opera7.20 in Win2k. At the risk of sounding silly... Are you using the name of your content frame in the target property? In my example, I used target="main" because within my <frameset>, the <frame> holding the content is set to name="main". So if your content frame is named something else, you'd have to use that name instead. E.g., consider the following frameset:...that doesn't work...
Code: Select all
<frameset rows="50,*">
<frame name="nav" scrolling="no" noresize src="nav.htm">
<frame name="body" scrolling="no" noresize src="body.htm">
</frameset>
Code: Select all
aI("text=Products;url=products.htm;target=body;");
Cheers,
Kevin
I won't slap you upside the head if you won't slap me upside the head for thinking that you were talking about v3 at the top of the thread!
Just to continue (because you got me curious), I tried the frames thing in a couple of other browsers. It did not work in IE4.01, NS4.75, and Opera6.05 (Win2k). I put a <base target="body"> tag in the <head> section of nav.htm and that worked for IE4.01 and Opera 6.05. But NS4.75 just crapped out (what else is new... who knows what caused it... screw it anyway). Interestingly, the <base> tag trick also worked for the all of the newer browsers I tried earlier... IE5/5.5/6, NS7.1, Moz1.2.1, Opera7.20... without having to specify the target in each menu item. In otherwords, if you only have one content frame, and if you use
in your navigation frame's html file, then you can define your menu items' links without specifying the target in each item, like
Saves having to type target=whatever; in each aI().
FWIW,
Kevin
Just to continue (because you got me curious), I tried the frames thing in a couple of other browsers. It did not work in IE4.01, NS4.75, and Opera6.05 (Win2k). I put a <base target="body"> tag in the <head> section of nav.htm and that worked for IE4.01 and Opera 6.05. But NS4.75 just crapped out (what else is new... who knows what caused it... screw it anyway). Interestingly, the <base> tag trick also worked for the all of the newer browsers I tried earlier... IE5/5.5/6, NS7.1, Moz1.2.1, Opera7.20... without having to specify the target in each menu item. In otherwords, if you only have one content frame, and if you use
Code: Select all
<head>
<base target="your_content_frame">
</head>
Code: Select all
aI("text=Menu Text;url=theUrlYouWant.htm";);
FWIW,
Kevin