Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:16:58+00:00 2026-06-15T18:16:58+00:00

I have a YAHOO.widget.Button of the type menu. My task is simple: The menu

  • 0

I have a YAHOO.widget.Button of the type “menu”. My task is simple: The menu is shown when the user clicks on the button, and is hidden when the user clicks elsewhere on the screen.

Here’s my code on jsfiddle:
http://jsfiddle.net/tRssn/

What I’ve tried so far:
1. Setting the clicktohide property of the Menu widget to true (see above code)
and
2. Subscribe to the blur event on the Button/Menu widget and close the menu if it’s visible.

Approach 1 doesn’t work for some reason and approach 2 works with IE and Mozilla, but not Chrome.

Shouldn’t there be an easy way to do this?

Any help appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:16:59+00:00Added an answer on June 15, 2026 at 6:16 pm

    Okay, I was able to solve this by explicitly creating a YAHOO.widget.Menu object, rendering it, and then assigning it as the menu to the YAHOO.widget.Button object.

    http://jsfiddle.net/tRssn/1/

    Strangely, I have to set the config for the Menu widget like this instead of at the time of the creation:
    oButton.getMenu().cfg.config.clicktohide.value = true;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Many might have had experience using File Upload widget from Yahoo User Interface library
I have a modal dialog box presented in Yahoo UI. The user selects a
I have a YAHOO Panel object defined like this: profilesDialog = new YAHOO.widget.Panel(profiles_dialog, {
I have a draggable YUI Panel defined like this new YAHOO.widget.Panel(parameters, { fixedcenter: true,
I'm creating a Yahoo! Widget and have done this before without any problems (creating
I have some trouble here, do you know Yahoo! News? I want to create
I have a Yahoo! Group that has its own Database tables for various reasons.
I have used Yahoo YUI Compressor for .net to minify my css and js
I have queried yahoo finance for historic data and have got JSon output. What
I have the following html code gogu@yahoo.com wants to be your partner. Do you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.