Show Hide button by click on checkbox

Discussion in 'Javascript' started by femtox77@gmail.com, Sep 19, 2007.

  1. Guest

    Hi, I try to show or hide a button when I click on checkboxes. I
    explain better. I'm learnig to use Jquery framework. I have a page
    with many rows and every row has a checkbox. I wanna show a button
    only when i check checkboxes. So I can show the button on every click
    but when i "reclick" to uncheck the checkboxes the button goes away.
    Any idea?

    Thank you
    Fem
     
    , Sep 19, 2007
    #1
    1. Advertising

  2. wrote:
    > [...] I'm learnig to use Jquery framework.


    You better unlearn. Unfortunately, jQuery is junk, and will remain
    so until some serious software design issues have been resolved.


    PointedEars
    --
    "Use any version of Microsoft Frontpage to create your site. (This won't
    prevent people from viewing your source, but no one will want to steal it.)"
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
     
    Thomas 'PointedEars' Lahn, Sep 19, 2007
    #2
    1. Advertising

  3. Guest

    On 19 Set, 21:11, "McKirahan" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > Hi, I try to show or hide a button when I click on checkboxes. I
    > > explain better. I'm learnig to use Jquery framework. I have a page
    > > with many rows and every row has acheckbox. I wanna show a button
    > > only when i check checkboxes. So I can show the button on every click
    > > but when i "reclick" to uncheck the checkboxes the button goes away.
    > > Any idea?

    >
    > Will this help?
    >
    > <html>
    > <head>
    > <title>checkboxs.htm</title>
    > <script type="text/javascript">
    > function checkboxs(but) {
    > var what = document.getElementById(but).className;
    > (what == "hide") ? what = "show" : what = "hide";
    > document.getElementById(but).className = what;}
    >
    > </script>
    > <style type="text/css">
    > .hide { visibility:hidden }
    > .show { visibility:visible }
    > </style>
    > </head>
    > <body>
    > <form>
    > <table border="1">
    > <tr>
    > <th>Checkbox<hr></th>
    > <th>Button<hr></th>
    > </tr>
    > <tr>
    > <th><input type="checkbox" onclick="checkboxs('but1')"></th>
    > <th><input type="button" value="Button 1" id="but1" class="hide"></th>
    > </tr>
    > <tr>
    > <th><input type="checkbox" onclick="checkboxs('but2')"></th>
    > <th><input type="button" value="Button 2" id="but2" class="hide"></th>
    > </tr>
    > <tr>
    > <th><input type="checkbox" onclick="checkboxs('but3')"></th>
    > <th><input type="button" value="Button 3" id="but3" class="hide"></th>
    > </tr>
    > </table>
    > </form>
    > </body>
    > </html>


    thank for the answer...i try this idea...bye
     
    , Sep 21, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    858
    Purvi T
    Oct 19, 2004
  2. UJ
    Replies:
    4
    Views:
    46,538
    pamam
    Apr 24, 2009
  3. Mike P

    show/hide divs on checkbox click

    Mike P, Nov 14, 2007, in forum: ASP General
    Replies:
    1
    Views:
    242
    Dooza
    Nov 14, 2007
  4. Advo
    Replies:
    2
    Views:
    109
  5. TGEAR

    show or hide fields using a checkbox

    TGEAR, Mar 13, 2007, in forum: Javascript
    Replies:
    1
    Views:
    156
    Bart Lateur
    Mar 13, 2007
Loading...

Share This Page