Make all buttons disappear, not only the one clicked

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chupcha
    New Member
    • Mar 2008
    • 1

    #1

    Make all buttons disappear, not only the one clicked

    Hello all,

    I'm very new to java script and I need help.

    I have a couple of buttons on a page that I need to disappear when one of the buttons is clicked. What I found is this:

    onclick="this.s etStyle('displa y', 'none')

    It works great, but only for the button that is clicked. How would I make it for all the buttons to disappear?

    Also, what is a good place for complete online documentation of JavaScript?
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Originally posted by chupcha
    Hello all,

    I'm very new to java script and I need help.

    I have a couple of buttons on a page that I need to disappear when one of the buttons is clicked. What I found is this:

    onclick="this.s etStyle('displa y', 'none')

    It works great, but only for the button that is clicked. How would I make it for all the buttons to disappear?
    In the above code, you are applying display:none style only to the button pressed. Make a function which hides all the buttons and call that function onclick of all the buttons.

    Originally posted by chupcha
    Also, what is a good place for complete online documentation of JavaScript?
    For a beginner, I recommend w3schools

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Please remember to provide a meaningful Title for any threads started (see the FAQ entry Use a Good Thread Title).

      This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions. Thanks!

      Comment

      Working...