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 3332948
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:44:33+00:00 2026-05-17T23:44:33+00:00

i have a script that once clicked ( a button ) some other thing

  • 0

i have a script that once clicked ( a button ) some other thing hides then once clicked again it re-shows. the problem is once hidden it never shows again here is the script:

menu_start.addEventListener(MouseEvent.CLICK, myClickFunction);


function myClickFunction(event:MouseEvent) {

      // Hide the first and show the next here
      if (menu_menu.visible == true){
      menu_menu.visible = false;

      } 
      if (menu_menu.visible == false) {
          menu_menu.visible == true;
      }

}

Thanks so much.

  • 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-05-17T23:44:34+00:00Added an answer on May 17, 2026 at 11:44 pm

    The reason is when you click on the
    button, it does hide but again when
    you click on the same button it does
    not show back

    Correct me if i am wrong in the above statement.

    Now try something on what i say, have two buttons Hide and Show. Create two new function and try it out, if this works then there is something you are missing in your logic, if this does not work then let us know.

    Also try this.

    function myClickFunction(event:MouseEvent) {
    
          // Hide the first and show the next here
          if (menu_menu.visible){
          menu_menu.visible = false;
    
          } else {
             menu_menu.visible = true;
          }
    
    }
    

    The other issue could be, when you click on the button may be its not getting the menu_menu property again as its hidden or destroyed. Is it inside the same component or called from somewhere else?

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

Sidebar

Related Questions

Right now I have a script that will update once the submit button is
I have a php script that is run once a minute. The script runs
I have a web scraping script that gets new data once every minute, but
I have a .sql script file that I want to run once every 24
I have a form that needs to run a php script once the submit
Right now on my website I have the following JavaScript that shows and hides
I have an iframe with an button that when clicked expands a list. I
I have a script that I am developing that creates a sliding button type
I have a script that grabs the 'id' of a clicked 'div' and uses
Ok I have a table that changes the displayed text once clicked on like

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.