Antoniohawk
07-08-2004, 02:53 AM
I have a couple questions and more will probably be added later. I'm working on a project where a wishlist is created from an xml file. The following are the files that make up the list.
xhtml: [http://null.ithium.net/andrew/NewGenMenuTree/wishlist2.html]
css: [http://null.ithium.net/andrew/NewGenMenuTree/wishlist2.css]
js: [http://null.ithium.net/andrew/NewGenMenuTree/menuTree.js]
xml: [http://null.ithium.net/andrew/NewGenMenuTree/wishlist2.xml]
xmlLoader: [http://null.ithium.net/andrew/NewGenMenuTree/xmlLoader.html]
The first question, is how to properly add the events to the links where the list item contains children.
<a href="#" class="parent" onclick="door(this); return false">Wishlist</a>
The two options that I saw, were either adding the onclick as an attribute, or using the addEventListener method. I'm guessing that the former might not work, and do not know how to use the latter.
I just read on Mozilla's DOM Reference that you can use element.onclick, maybe that is the way to go.
My next question, is how to add the text within the <a> and </a>.
-----=-----=-----=-----
There are a zealous few out there that would like nothing better than to do this for me. Please refrain from doing so, so that I can see what I can accomplish myself. :)
-----=-----=-----=-----
xhtml: [http://null.ithium.net/andrew/NewGenMenuTree/wishlist2.html]
css: [http://null.ithium.net/andrew/NewGenMenuTree/wishlist2.css]
js: [http://null.ithium.net/andrew/NewGenMenuTree/menuTree.js]
xml: [http://null.ithium.net/andrew/NewGenMenuTree/wishlist2.xml]
xmlLoader: [http://null.ithium.net/andrew/NewGenMenuTree/xmlLoader.html]
The first question, is how to properly add the events to the links where the list item contains children.
<a href="#" class="parent" onclick="door(this); return false">Wishlist</a>
The two options that I saw, were either adding the onclick as an attribute, or using the addEventListener method. I'm guessing that the former might not work, and do not know how to use the latter.
I just read on Mozilla's DOM Reference that you can use element.onclick, maybe that is the way to go.
My next question, is how to add the text within the <a> and </a>.
-----=-----=-----=-----
There are a zealous few out there that would like nothing better than to do this for me. Please refrain from doing so, so that I can see what I can accomplish myself. :)
-----=-----=-----=-----