Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: checkbox value?

  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts

    checkbox value?

    Hi there. If I disable a checkboc but have the default status to CHECKED. How can I show that the value is set to ON? It seems if the checkbox is disabled I can't get the status of it. Am I doing something wrong?

    <input type="checkbox" checked DISABLED name="adjust" >

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    159
    Thanks
    2
    Thanked 15 Times in 15 Posts
    Code:
    <form name="form">
    <input type="checkbox" checked DISABLED name="adjust">
    <input type="button" value="Check" onClick="alert(document.form.adjust.value);">
    </form>

    This works fine for me! If you're still encountering a problem. It may be a javascript issue, therefore give up a snippet of the javascript that you using to check the value of the checkbox!


    ~Jordan
    Remember The Thank You Button Is Your Friend =]

    [ PHP / Javascript / VisualBasic / HTML / DHTML / CSS / .NET / MySQL ]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •