Page 1 of 1

drop down menu not closing onclick

PostPosted: Wed Jan 21, 2009 5:37 am
by rging
I've got calls to ajax populating div areas without page reload, and the drop down menus won't clear when clicked. I presume the design assumes a page re-load, so this would not be a problem, but my site does not ever do a page re-load, only content refresh. Any idea what's wrong? Am I missing something?

Re: drop down menu not closing onclick

PostPosted: Thu Jan 22, 2009 2:07 am
by Karlis
Menus have nothing to do with refreshing he page. Please note, however, that if you are processing page content you must be careful not to touch anything connected with menu code. You should not alter the HTML or CSS code of the menus in any way.

If you would like us to take a look, just drop in a link to your page or a test page that demonstrates the problem and we will look at it.

Re: drop down menu not closing onclick

PostPosted: Thu Jan 22, 2009 2:38 am
by rging
Thanks for the reply. Here is a link to the page. Select "Artist Tools" then "Tour Planner".

http://www.toursavant.com/rg

Re: drop down menu not closing onclick

PostPosted: Thu Jan 22, 2009 7:53 pm
by Karlis
Does your javascript function return ture? I'm not an expert of JavaScript, but it seems that your should return a true value for this to go through.

Re: drop down menu not closing onclick

PostPosted: Thu Jan 22, 2009 10:04 pm
by rging
I tried that just now. With target="_self", it brings up a blank page with "true" as the only content, with target="fileuploadframe", which is a hidden iframe, it executes the desired function, who's content ends up in "main" div, but the submenu still does not close.

I've looked around at other sites using this menu system, and all the ones I found actually navigate to a new page when a submenu item is clicked, so of course, the menu is "closed", since the page has changed. In fact, the submenu stays visible until the current page goes away, pending loading of the new page. In my case, I'm not navigating off the page at all, just changing the innerHTML property of a div on the current page. Hope this makes sense and you can help me.

Re: drop down menu not closing onclick

PostPosted: Mon Jan 26, 2009 9:07 pm
by Karlis
The developer said that you must call this JavaScript function to close the menu:

Code: Select all
ebmTickerOn(cbnOpenTopMenu);


Try it.

Re: drop down menu not closing onclick

PostPosted: Mon Jan 26, 2009 10:44 pm
by rging
That fixed it, thanks much.