SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry whast wrong with this?

    hi guys..iknwo this is wrong place but i am so atached to this php forum...

    i have a check box scripot but i used a smile java script so that a user shud choose minimum 1 option in that..

    the thing is when ever he clicks on the option the submit button is active..but when he UNCKECKS IT it still remains active..

    the code i use is

    <input type="checkbox" value="<?php echo $movielink; ?>" name="song[]" onclick="document.getElementById('but').disabled=false"><?php echo $title; ?><br />

    <input type="Submit" value="Submit" id="but" disabled="true">
    please help me brothers!

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="checkbox" value="<?php echo $movielink; ?>" name="song[]" onclick="document.getElementById('but').disabled=false"><?php echo $title; ?><br />
    
    <input type="submit" value="Submit" id="but" disabled="true">
    lower s on type

  3. #3
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type="checkbox" value="<?php echo $movielink; ?>" name="song[]" onclick="document.getElementById('but').disabled=false"><?php echo $title; ?><br />

    <input type="submit" value="Submit" id="but" disabled="true">

    when i click on a check box the submit button is enabled but when i uncheck it...it still is in ENABLED state .....how should it be disabled ...so that the user surely checks on one box at least??


Bookmarks

Posting Permissions

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