rachel
Junior Member
Posts: 3
Registered: 12/5/2003
Member Is Offline
|
| posted on 12/5/2003 at 11:50 PM |
|
|
highlight current picked menu
hello,
my menus appear in the top frame of the document as icons. I want it possible to highlight the menu that was picked after I click one of it's
items,
meaning, I want two things to happen when I click an item: 1. the menu icon will be replaced by a different icon image, 2. the main frame in my
document will receive the relevant link.
what do I do?
|
|
|
DX4
Junior Member
Posts: 9
Registered: 12/1/2003
Location: Toronto, Canada
Member Is Offline
|
| posted on 12/7/2003 at 06:06 PM |
|
|
Hey there!
The menu_items.js file contains all your menu items, right? Each item should contain 3 elements. The first element is always the name, the second
always the link. The third optional element is the scope, and if you enter in {tw: framename} then it will update the frame within the window with
the link.
See http://www.softcomplex.com/products/tigra_menu/docs/ for
more details.
Your "icon change" is another matter. I don't think you're going to be able to do this without making code changes. Of course,
how comfortable you are doing this will determine if and how.
|
|
|
rachel
Junior Member
Posts: 3
Registered: 12/5/2003
Member Is Offline
|
| posted on 12/7/2003 at 09:07 PM |
|
|
hello DX4 and thanx for your reply
I already used the {tw: framename},
and it's working fine.
I also tried dealing with the icon, by putting this in an html containing the icons:
<script language="JavaScript">
<!--
var mainUrl = parent.main.location.href;
if ((mainUrl == "history.htm") || (mainUrl == "location.htm"))
{
window.self.location.replace('top-abo.htm');
window.self.location.reload();
}
//-->
</script>
but it doesn't work.
is it much more complicated that this?
I'm really just a beginner. you can tell me the hard truth...
|
|
|
tigra
Administrator
Posts: 1990
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 12/10/2003 at 07:45 AM |
|
|
Actually there is the way to switch item appearance when corresponding page is selected in target frame. I'm not sure if you will like it because
it is far from ideal in regards to site maintenance. Here it goes:
1. You create separate items hiearchies each has particular item permanently highlighted with some inner HTML.
2. You create separate HTML documents for navigation frame each has different items file linked
3. You add onload handlers to each content page. Handler reloads navigational frame with the menu that has corresponding item highlighted
So when you click the menu item new document loads in content frame and it reloads navigational frame with menu having corresponding item
highlighted.
There are ways to ease site maintenance by using single file for menu items, but with some smart wrappers which will check URL of the document in the
content frame and compare to url of the item and highlight the item if they match. You'll need reload call in content documents anyway, but at
least they will be all the same in this case.
Feel free to ask for more details if anything is unclear
|
|
|
rachel
Junior Member
Posts: 3
Registered: 12/5/2003
Member Is Offline
|
| posted on 12/14/2003 at 02:55 PM |
|
|
highlighted menus
thanx a lot!
though it took some work, and generated more files, it really works!
thank you very much!!!
|
|
|