hi all,

I'm a developer...I'm customizing the treeview plugin to use it in a
site where i need also a breadcrumb (designer request...) and to
highlight the selected node.

I am totally new in JQuery affair... I've used it before only in a
deaf way, without any kind of customization. I'm used to write js code
totally on my own according to my needs...

So (referring to the standard 'menu3' example) I added to every <span>
tag an onclick link to a customized function and a class to persist
the selection style.

OK it works on every browser. The selected item on every node is
highlighted, and the selection of another item resets all the
situation on his level and children, and so on = perfect!

But last AND least, to use the breadcrumbs, I added an ID to every tag
(at the time in a static way, but if the testing will be
successful,dynamically with ASP in the future), in order to drive the
tree with an external crumb function. In this way, with testing
purposes, from a dummy anchor I fire the function that sounds like
this (assuming that on the current situation I want to open an item on
the 2nd sublevel, and that it's the first step in this
development...the function can be dinamized better!):

document.getElementById("rootLevelItem").click();
document.getElementById("1st sublevelItem").click();
document.getElementById("2nd sublevelItem").click();

OK works perfectly in IE... the menu opens at the desired node as I
want! Other step: I need to make it working on Firefox, Safari, Flock,
Chrome...and so on.
So I tried the FF version of the js method .click() --> .onclick()

document.getElementById("rootLevelItem").onclick();
document.getElementById("1st sublevelItem").onclick();
document.getElementById("2nd sublevelItem").onclick();

and...surprise!  The tree does not react in any manner, but my own
functions that manage the style of the <spans> are perfectly working,
and I can test them opening the tree in a manual way.

So it seems that the jQuery code reacts to the click() method for IE,
but not to the onclick() method for the other browsers. (they show ALL
the same problem).

Now I only can ask you - jQuery experts! - WHY jQuery does not react
to this js method.

I'm afraid to handle jQuery code directly...I'm too 'novice' for it.
And I've too many tasks open at the moment, so I can't waste too much
time.
And -sure!- I don't want to write a custom-hybrid treemenu and a
breadcrumbs using Flex, thing that I and my co-developer had already
done for another site, and that I consider full of problems, time-
expensive and too complicate, like killing a fly with a bazooka.

Many many thanks in advance.

Diego GPC

Reply via email to