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
Authorized Witango Reseller
http://www.pcforge.com/WitangoGoodies.htm 
Latest downloads & List Archives @
http://www.witango.ws

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of [Gauthier]
Sent: Sunday, May 26, 2002 11:27 PM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: [OT] javascript newbie need a hand

 

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

Reply via email to