From walt@helvatron.co.uk Thu Feb 18 18:23:13 2010 From: walt To: staffslug@staffslug.org.uk Subject: Re: [Staffslug] Javascript Problem Date: Thu, 18 Feb 2010 18:22:57 +0000 Message-ID: <000701cab0c7$65203330$2f609990$@co.uk> In-Reply-To: c7a4f9f81002180959s7a8e7268u5052c34e1d4efc06@mail.gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6102737319230301742==" --===============6102737319230301742== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit OK, here we go. The script is below the problem description and simply represents a simplified version to illustrate the problem which I have not been able to solve. I have spent ours on Google without tracking down the issue. It's menu script where I am using html/css dom to access the attributes. I want to change the display attribute on child elements from 'none' to 'block' and the other way round when the parent node is clicked. That is the basics but I want to refine that after this problem gets solved, if it solvable. The interesting and very annoying thing is that it works fine when applying the 'block' attribute to the child nodes of the first parent 'a-1' which shows and hides the child nodes fine. When I click the 'b-1' node that works too BUT then the function exits and is called again from somewhere. The alert('Exiting Function'); is there to show what's happening. The function does terminate and then is called again as you will see. I thought it might be the 'onclick' calls in the sibling elements but when I take them out it still happens. So, any hints as to what's going on are appreciated. This is definitely out of my league. Thanks, Walter Start of SCRIPT: ----------------------------------------------------------> Menu Test This is a menu test!!


----------------------------------------------------------> End of SCRIPT: -----Original Message----- From: staffslug-bounces(a)staffslug.org.uk [mailto:staffslug-bounces(a)staffslug.org.uk] On Behalf Of Tig Sent: 18 February 2010 17:59 To: staffslug(a)staffslug.org.uk Subject: Re: [Staffslug] Javascript Problem Give it a go, the worst that could happen is that no one else knows :-) On Thu, Feb 18, 2010 at 5:57 PM, walt wrote: > Hi, > > Would it be ok to submit a javascript problem?. I simply cannot figure out > why a function exits and is called again from somewhere but I am stumped as > to how it happens. I am not a programmer but I have done quite a bit of > scripting. > > I have tried in all major browser and the problem occurs in all of them. > I'll post the whole script, html - css and javascript with a description of > the problem if one of you clever guys wouldn't mind have a quick look. > > Very many thanks, Walter > > > _______________________________________________ > Staffslug mailing list > Staffslug(a)staffslug.org.uk > http://lists.staffslug.org.uk/mailman/listinfo/staffslug > _______________________________________________ Staffslug mailing list Staffslug(a)staffslug.org.uk http://lists.staffslug.org.uk/mailman/listinfo/staffslug --===============6102737319230301742==--