MyBB Community Forums

Full Version: Popup Menus Disappears
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello
i want to make a dropdown menu which does not disappear while you click on ,something like this :
<a href="{$mybb->settings['bburl']}" id="test_menu"><strong>Test</strong></a>
<div id="test_menu_popup" class="popup_menu" style="display: none;">
<div class="popup_item_container"><p>Hello</p></div>
</div>
<script type="text/javascript">
    if(use_xmlhttprequest == "1")
    {
        new PopupMenu("test_menu");
    }			
</script>
now if you click on hello, menu will disappear but it's not a link, so is it possible to make it not to disappear ?
So what do you want to happen when you click it?
try this;
<div>
<a href="{$mybb->settings['bburl']}" id="test_menu"><strong>Test</strong></a>
<div id="test_menu_popup" class="popup_menu" style="display: none;">
<div class="popup_item_container"><p>Hello</p></div>
</div>
<script type="text/javascript">
    if(use_xmlhttprequest == "1")
    {
        new PopupMenu("test_menu");
    }            
</script>
(2010-12-13, 07:11 PM)AJS Wrote: [ -> ]So what do you want to happen when you click it?

i want nothing to happen. i want it only disappear when you click outside of the popup not inside.

(2010-12-13, 09:01 PM)Dark Byte Wrote: [ -> ]try this;
<div>
<a href="{$mybb->settings['bburl']}" id="test_menu"><strong>Test</strong></a>
<div id="test_menu_popup" class="popup_menu" style="display: none;">
<div class="popup_item_container"><p>Hello</p></div>
</div>
<script type="text/javascript">
    if(use_xmlhttprequest == "1")
    {
        new PopupMenu("test_menu");
    }            
</script>

not working, thx. (you have opened three div tag but you have closed only two of them, isn't it wrong?)

(2010-12-14, 08:02 AM)noyfound Wrote: [ -> ]i want nothing to happen. i want it only disappear when you click outside of the popup not inside.

I can't understand why you'd want to do that?

Anyway, you'd probably need to edit the javascript itself to make that happen.
(2010-12-14, 10:12 AM)AJS Wrote: [ -> ]I can't understand why you'd want to do that?

Anyway, you'd probably need to edit the javascript itself to make that happen.
i don't even exactly know why i want to do that Big Grin but thanks for your support so i have to use my own script.

MyBB support Rocks!