drop down menu not closing onclick

Post your questions and problem reports here.
Post Reply
rging
Posts: 4
Joined: Wed Jan 21, 2009 5:31 am

drop down menu not closing onclick

Post 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?
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: drop down menu not closing onclick

Post 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.
Karlis Blumentals
Blumentals Software
www.blumentals.net
rging
Posts: 4
Joined: Wed Jan 21, 2009 5:31 am

Re: drop down menu not closing onclick

Post by rging »

Thanks for the reply. Here is a link to the page. Select "Artist Tools" then "Tour Planner".

http://www.toursavant.com/rg
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: drop down menu not closing onclick

Post 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.
Karlis Blumentals
Blumentals Software
www.blumentals.net
rging
Posts: 4
Joined: Wed Jan 21, 2009 5:31 am

Re: drop down menu not closing onclick

Post 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.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: drop down menu not closing onclick

Post by Karlis »

The developer said that you must call this JavaScript function to close the menu:

Code: Select all

ebmTickerOn(cbnOpenTopMenu);
Try it.
Karlis Blumentals
Blumentals Software
www.blumentals.net
rging
Posts: 4
Joined: Wed Jan 21, 2009 5:31 am

Re: drop down menu not closing onclick

Post by rging »

That fixed it, thanks much.
Post Reply