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: Saturday July 14 2012 - 06:07:43

duplicating and coloring pages in the menu


Poster: tony
Dated: Wednesday September 11 2002 - 6:27:04 BST

I am using the Mad Toast version which colors the subject area that any particular page belongs to. Great.

In a few instances, I have the same page duplicated in the menu under different subject areas, as they belong in both.

I'd therefore like a page which is in two different subject areas to highlight the subject area it belongs to in the menu. Short of duplicating the pages themselves which I'd rather not do, I have tried differentiating the URLs by
using for the second use of any page in the menu:

pagename.php?
pagename.php?category
pagename.php#top

but the menu is too clever and recognises all these as the same.

Is there any way I can fool it into thinking that the same page is in fact different?

thanks for any ideas!


Poster: John
Dated: Thursday September 12 2002 - 15:57:09 BST

It's still early here, but would anything on http://www.milonic.co.uk/menu/menusampl ... ampleid=12 help what you need?


Poster: tony
Dated: Thursday September 12 2002 - 16:55:56 BST

Thanks John, but no. The functionality of MadToast is that it actually highlights just the category that any individual page you are visiting.

Therefore, it can see the tree of links, in order to know which one to color.

I am therefore wanting to fool it by on a second use of a link in menu_array having a slightly different URL as mentioned in original posting. However, Milonic is clever enough to read ? or #top as being the same. Maybe if I try a longer string after '?'

Thanks for any other ideas

Best wishes


Poster: John
Dated: Thursday September 12 2002 - 17:15:57 BST

Ah, well - sorry 'bout that. Told you it was early here :!:

BTW, what is MadToast?


Poster: tony
Dated: Thursday September 12 2002 - 17:45:18 BST

My admiration for Andy's menu is unbounded. If there's maybe one thing he could do, that is spell out a little more clearly everything that's available, and also what every last customer-adjustable option is in the menu :-)

The Mad Toast version (which he actually sent to me - though I see one or two other of the sample sites using it) colorises subject area links.

You can see my one working at eg

http://www.gospelcom.net/guide/resources/webmaster.php

- disregard the religious stuff if this is not your frame of reference.

You'll see how it nicely colors a subject area - but in a few instances, I have a page duplicated under different subject areas where I think that appropriate.

I've also got a noscript option if you turn your javascript off, which does the same thing.

Best wishes

Tony


Poster: John
Dated: Thursday September 12 2002 - 18:08:46 BST

tony wrote:
My admiration for Andy's menu is unbounded. If there's maybe one thing he could do, that is spell out a little more clearly everything that's available, and also what every last customer-adjustable option is in the menu


I agree, and he has promised to work on the docs but nothing yet. With 4.0 on the table when he gets back I have to assume they will get pushed off again.

Thanks for the info on MadToast.

BTW, I get a JS error when entering the URL you sent, before I even do anything menu-related. Just FYI.


Poster: tony
Dated: Thursday September 12 2002 - 18:25:29 BST

O dear, I don't! What browser? Mind you, there are two syndicated columns on that page inserted by javascript, so perhaps that is the problem?

Can you try, say,

http://www.gospelcom.net/guide/resources/revise.php

which has no syndicated inserts

thanks!!

tony


Poster: John
Dated: Thursday September 12 2002 - 18:52:23 BST

Same thing at the new URL, Tony. The error message is pretrty useless ("Error: Expected ')'") with a line number to the script (not the array). I've had these myself and it's always turned out to be a missing or misplaced 'something' in the array file.

Using IE 6 under XP Pro. FWIW, here's what I get out of NS 4.79...

Code:
JavaScript Error:
http://www.gospelcom.net/guide/resources/mmenu.js, line 423:

missing ) after argument list.

ShM=1;shl('menu3',17,'show');popi('counsel.php','menu3',17); ;return stch('Finding help for life's problems');
.................................................................................................^

JavaScript Error:
http://www.gospelcom.net/guide/resources/mmenu.js, line 423:

missing ; before statement.

status='Finding help for life's problems';
..............................^

JavaScript Error:
http://www.gospelcom.net/guide/resources/mmenu.js, line 423:

missing ; before statement.

status='Finding help for life's problems';
..............................^


I think you need to do something like "...life\'s..." (escape the " ' "), but I could easily be wrong on the exact syntax.


Poster: tony
Dated: Thursday September 12 2002 - 19:33:55 BST

Thanks John! Yes, I should have escaped the apostrophe. All my browsers were sufficiently flexiable to cope with it, so I am grateful that you picked it up.

Would you be so kind as to check that it is OK now?

Mega thanks


Tony


Poster: menufurfer
Dated: Thursday September 19 2002 - 2:34:50 BST

I didn't get any error messages in NS 4.79 but maybe by this time you fixed it.

However what a difference in 4.79 from IE 5.5!!!

The whitespace left margin in IE simply vanishes in NS and so the menu is constantly covering the text. When the selection pops a long list, the top selections get partially covered by the email window and Subscribe button and are consequently unreadable but only in the home position of the menu; not so, once it has begun to roll. Now isn't that interesting.

Holy Mozilla!! /mfurf


Poster: tony
Dated: Thursday September 19 2002 - 10:23:11 BST

Thanks, yes I know that NN just does not cope with a lot of things in CSS. I have yet to work out why the floating menu itself has a big right-hand block - Andy's own one works OK in NN4. The issue of no l.h. margin is that something in the scripts in the top (fixed) menu is somehow cancelling out the style for the margin, which NN can manage to recognise normally. I'll try and fix it!

If anyone is interested, I have made an identical noscript version of my menu using css which also highlights the subject area any page happens to be on. View, eg, http://www.web-evangelism.com/resources/revise.php with javascript switched off.

Best wishes

Tony


Poster: erwin-mail __at__ laposte.net
Dated: Thursday September 19 2002 - 15:06:00 BST

Tony,

I just read this message thread and see that it relates to what I am doing...

I want to highlight the entire navigation tree for the page that the visitor is looking at. I tried the "Mad Toaster" version, but I cannot get it to succeed.

The reason, I believe, could be the fact that all the pages have the same name, i.e. main.php and what makes the page different, is the included document and the preferred language, e.g. main.php?doc=100&hl=fr.

All I can get to highlight is the current page; that is the correct behaviour, but the parent menu does not show a change.

Any help will be highly appreciated.

Regards,

Erwin


Poster: tony
Dated: Thursday September 19 2002 - 16:10:38 BST

Hi Erwin

I see your problem - the menu perceives every page as the same page owing to your url structure. I did experiment with this the other way round because in a few cases, I wanted to have the same page listed under two different subject areas, and highlight either subject area it was in, according to how it was arrived at. I tried to differentiate pages by ending in, eg, #top, #anything,
? or ?anything, but Milonic perceived all those as being equivalent to the simple page URL.

So sadly, I think that intrinsically, you cannot do it with your present page structure using ? after your domain. Unless anyone can propose a way, eg some sort of javascript which would somehow rewrite the URL for you each time. But since this would only happen after the page had loaded, I think that is unlikely to help either. I do, as it happens, have a script that will strip out everything after the ? but you want something that would work the other way!

Best wishes

tony


Poster: erwin-mail __at__ laposte.net
Dated: Thursday September 19 2002 - 16:30:57 BST

Thanks Tony,

... but just as I was ready to give up, I realise that only Opera (v6.04) is not showing the current topic.

NS (v4.79) and IE (v.6.028) do show everything nicely.

This is maybe something to look at for new releases, Andy?

Best regards,

Erwin

BTW: I am using the Mad Toaster version (3.5.02 with Nicolas Stohler's extensions).


Poster: tony
Dated: Thursday September 19 2002 - 17:55:33 BST

That's interesting that it is browser-dependant.

So maybe my own wish to slightly differentiate pages with ?something or #something WILL work in later browers. I will try again.


Best wishes


Tony


Poster: tony
Dated: Monday September 30 2002 - 13:00:27 BST

Hi Erwin

I can't get mine to do what yours is obviously doing - yet I'd like to. Even in IE6, I cannot fool the menu into thinging that

page.php?anyoldthing

is a different page to

page.php

and so should highlight it differently in MadToast.


I'm glad you got this to happen for you - what is your URL for it, and any suggestions?

Best wishes

Tony


Poster: erwin-mail __at__ laposte.net
Dated: Tuesday November 12 2002 - 13:47:14 GMT

Sorry for the delay. The site is http://www.infibail.com

Interestingly, I did nothing to it. It just worked. :roll:

Regards,

erwin