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:27
Page Highlighting Image
Poster: moholland
Dated: Wednesday June 25 2003 - 14:53:32 BST
Is it possible to have the xp style image that changes on mouseover to also indicate the currently selected page? I only see 'pagecolor' and 'pagebgcolor' which changes the text color and background color. I guess I'm looking for 'pageoverimage' which doesn't appear to work. Thanks for your help.
pageoverimage
Poster: zotsf
Dated: Thursday June 26 2003 - 23:37:17 BST
I'd really love to see that as well. Is there an existing way? or is that still being developed?
Poster: Andy
Dated: Friday June 27 2003 - 12:14:29 BST
Oh yeah, good point. hadn't thought of that.
Leave it with me and I'll see that I can do
Cheers
Andy
pageover image
Poster: zotsf
Dated: Friday June 27 2003 - 17:35:33 BST
yah! [patiently waiting like a dog] [wagging tail]
Poster: Andy
Dated: Saturday June 28 2003 - 17:09:45 BST
I've just posted version b4.1.13 to http://www.milonic.com/4beta/menu.htm
Included is a new parameter called pageimage that can be declared in the style or in a menuitem.
Code:
pageimage=/images/pageimg.gif;
Enjoy!
Cheers
Andy
Poster: zotsf
Dated: Wednesday July 2 2003 - 19:33:45 BST
Very cool. I've got it implemented, but there seems to be a bug...or I'm missing something.
When you are on one of the top level pages, pageimage= doesn't work. If you are on a page that is under that top level page, then it does.
Check it out...
http://dev.benzot.net/index.jsp
Poster: moholland
Dated: Thursday July 3 2003 - 3:06:03 BST
Andy, thank you for the update... amazing service.
zotsf, i could be totally wrong but it looks like the menu might not work in your case because the files are in different folders but they are all still using the same name... 'index.jsp' Maybe if you added a dummy query string to the link then that would help because the menu is working perfectly for me. Every page is the same name but with a different value in the query string. So, 'index.jsp?z=products' for example. Hope that helps but I could be totally wrong.
Poster: zotsf
Dated: Thursday July 3 2003 - 6:12:53 BST
Yeah, Andy, thanks for the speedy turn around on this one. Extremely cool.
And thanks, moholland, for the tip, but unfortunately it didn't solve the problem.
I tried your suggestion of adding a parameter to one, and then all, of the links. I even tried changing company/index.jsp to company/company.jsp to no avail.
Any one else have a suggestion?
Poster: Maz
Dated: Thursday July 3 2003 - 7:42:01 BST
I'm slowly making changes, don't know where this error is:
line 9 char 17797 _mi [...].18' is not an object
edit:
---------
;;;;;;; //some of these were missing
---------
Will this be correct as stated above:
aI("text=
to
aI("pageimage=/images/
edit:
---------
image=
---------
Thank you!
maz
Poster: zotsf
Dated: Saturday July 5 2003 - 23:55:41 BST
[quote="maz"]I'm slowly making changes, don't know where this error is:
line 9 char 17797 _mi [...].18' is not an object
edit:
---------
;;;;;;; //some of these were missing
---------
[/quote]
Thanks. I'm not sure that makes much of a difference though
[quote="maz"]
Will this be correct as stated above:
aI("text=
to
aI("pageimage=/images/
edit:
---------
image=
---------
[/quote]
I don't understand. Are you saying to replace 'pageimage' with 'image'?
Thanks.
Poster: zotsf
Dated: Monday July 7 2003 - 20:10:56 BST
What I'd ideally like, is to have pageimage work anywhere within a given directory (like .../education/... ) regardless of whether or not the particular page you are on is part of the navigation menu.
check out http://dev.benzot.net/ again. The highlighting I'd like is seen if you click on one of the sub menu links, say 'education/one.jsp'.
In this example, if you go to education/one.jsp, education/two.jsp, education/three.jsp, or education/four.jsp you get the highlight effect I want. If you go to education/five.jsp, which is not on the menu but does exist, the highlight would work. I'd also like it to work if you are at the top level, education/.
Andy, maz, anyone?
Thanks guys.
Poster: zotsf
Dated: Wednesday July 9 2003 - 17:25:53 BST
yaah, RC2 addresses part of this issue. Now if you are in the top level directory or on a page that is linked to from a menu, the pageimage works correctly.
Any chance we can get the pageimage to work on a directory level across the board? Meaning, can you set it so that pageimage works when on pages that are not in the menu, but are in the top level directory?
Again, by example....
the menu would currently contain the following links:
education/
education/one.jsp
education/two.jsp
education/three.jsp
the menu would NOT contain the following, but the files would be there and linked to elsewhere on the page:
education/four.jsp
education/five.jsp
etc...
Look at http://dev.benzot.net/v52/ for an example
Thanks
work around
Poster: zotsf
Dated: Thursday July 10 2003 - 19:56:54 BST
I've got a work around for pageimage.
As explained (maybe not so well) above I'd like the 'pageimage' function to work for any page within a given directory rather than just the pages that are linked to from the menu.
my work around discards use of the pageimage function and simply utilizes more than one menu with some logic.
var loc = location.href;
if(loc.indexOf('education')) {
menuone
} else if (loc.indexOf('products')) {
menutwo
}
etc...
This way if we are in the 'education/' directory, menuone has the education menu item as the highlight. If we are in the 'products/' directory, menutwo has the products menu item as the highlight.
see http://dev.benzot.net/v4/ for an example.
Hopefully this is a short term solution but it works
Poster: Hergio
Dated: Friday July 11 2003 - 1:59:18 BST
I agree that this would be a neat feature, but I think it kinda defeats the purpose of having the menu. If you get to a page using the menu, then obviously the whole point of the menu was to get you there and the point of the highlighting is to show there that page lies in the menu hierarchy. The menus don't necessarily (and in most cases do not) have to follow the directory structure of the server.
I think thats really cool that you got it working for your purpose. But I think to have that implemented would be costly (but if anyone can do it, andy can) and also tough to implement correctly all the time. If people had two pages under the same directory that were located in different menus because they had nothing to do with each other, then it would cause incorrect highlighting.
I look back on this and it looks like I am trying to shoot you down, but I don't want it to come off that way. I apologize if it does. I am just try to saying having it in there would be fixing a very specific and rare problem, and might cause more problems then it was originally supposed to fix. Just my two cents.
Poster: zotsf
Dated: Friday July 11 2003 - 16:47:19 BST
No worries, I don't feel shot down.
I see your point that as a general function my request could cause as many problems as fix them regarding directory structure.
Maybe there could be a seperate function that allows the developer to indicate "section" or "category" that would enable them to set a trigger which calls pageimage or something.
For now I've got my specific work around.
Thanks