|
Hi,
Found that the main <UL> is the one receiving the onClick event so I changed it to use a single onclick call and then extract the document.all index and go from there. (see attached). I have changed it so that it just deletes the li clicked
I think the speed at which this is all changing; makes us all newbie’s ;-) Ben Johansen - http://www.pcforge.com -----Original Message-----
Hi,
I'm just starting experimentation with javascript, here is an attached html file to illustrate my post, the idea is to have a simple DOM compliant manipulable menu base on <ul> and <li> tags. I've defined 2 function: hideChilds(elm) wich take an elements and hide all the child tags elements showChilds(elm) that does the oposite of hideChilds
Currently 2 problems occurs: -I'm unable to replace accurately the onclick event of the 'elm' parameters of my functions -clicking on a child <li> fire onclick of parent <li>
so two questions: -how can I set the elm.onclick property (should I call it a property???) to call the oposite function? -how can I avoid onclick event of parents elements (try clicking on a submenu item)
I've added an alert at the end of each functions as checking purpose I've commented my last instruction that reaffect the elm.onclick property
Thanks alot for any hint
Gauthier |
- Witango-Talk: [OT] javascript newbie need a hand [Gauthier]
- Re: Witango-Talk: [OT] javascript newbie need a h... Ben Johansen
- Re: Witango-Talk: [OT] javascript newbie need... [Gauthier]
- RE: Witango-Talk: [OT] javascript newbie ... Ben Johansen
- Re: Witango-Talk: [OT] javascript new... [Gauthier]
- RE: RE: Witango-Talk: [OT] javascript newbie nee... Campbell, Steve V.
- RE: RE: Witango-Talk: [OT] javascript newbie nee... Lee Sobo
- RE: RE: RE: Witango-Talk: [OT] javascript newbi... Campbell, Steve V.
