Manipulating a button based on readonly attribute of a check box

Discussion in 'ASP General' started by Jack, Jun 22, 2005.

  1. Jack

    Jack Guest

    Hi,
    I have a asp page where a checkbox, when clicked will disable all text boxes
    associated with the page.

    The following is a part of a code for the checkbox with its name and
    readonly attributes.
    name="chk_Complete" <%= isReadOnly %>

    I have to disable(or make sure does not disaplay) a save button in the same
    page when this checkbox's attribute is readonly. I have no idea how to do
    this.
    I need some help/idea to handle this issue. Thanks.
     
    Jack, Jun 22, 2005
    #1
    1. Advertising

  2. Jack

    JitGanguly Guest

    Are you trying to do it on server side ? I think you want client side for
    that your code is not right.
    You need something like

    So for series of checkboxes, you want to write a function that would do it
    like
    <html>
    <body>
    <form name=form1>
    <input type=checkbox name="aaa" value="aaa">
    <input type=checkbox name="bbb" value="bbb">
    <input type=button value="Disbale" onclick=disableall()>
    </form>
    </body>
    </html>
    <script>
    function disableall()
    {
    document.form1.aaa.disabled=true
    document.form1.bbb.disabled=true
    }
    </script>


    "Jack" wrote:

    > Hi,
    > I have a asp page where a checkbox, when clicked will disable all text boxes
    > associated with the page.
    >
    > The following is a part of a code for the checkbox with its name and
    > readonly attributes.
    > name="chk_Complete" <%= isReadOnly %>
    >
    > I have to disable(or make sure does not disaplay) a save button in the same
    > page when this checkbox's attribute is readonly. I have no idea how to do
    > this.
    > I need some help/idea to handle this issue. Thanks.
     
    JitGanguly, Jun 22, 2005
    #2
    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. mit
    Replies:
    1
    Views:
    845
    Ramu Pulipati
    Jan 25, 2006
  2. Grey
    Replies:
    1
    Views:
    2,290
    avnrao
    May 31, 2004
  3. Matt
    Replies:
    1
    Views:
    4,203
  4. Jonathan Hyatt
    Replies:
    1
    Views:
    2,139
    Jonathan Hyatt
    Jun 8, 2004
  5. Jack
    Replies:
    3
    Views:
    188
    JitGanguly
    Jun 23, 2005
Loading...

Share This Page