Web Analytics Made Easy -
StatCounter How to change button text based on CheckBox Checked or not [PHP5] - CodingForum

Announcement

Collapse
No announcement yet.

How to change button text based on CheckBox Checked or not [PHP5]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change button text based on CheckBox Checked or not [PHP5]

    Currently on my page I have a checkbox & a input button (among other things), the button text now is hardcoded to "Next" but I need this to change based on the status of the Checkbox (cBusAcc). For example, when cBusAcc is not checked the button should be "Create", when it is checked the button should be "Next".

    And this change should occur without the user needing to press on the button, just check/uncheck should change the button test...
    See the code I have so far below...

    Code:
    ...
    <input type="checkbox" name="cBusAcc" id="cBusAcc" />
    <input name="signup" id="signup" type="submit" value="Next" />
    ...
    How can I accomplish this (I've got no clue...)
    Any help or hints would be very much appreciated.

    Thanks,

  • #2
    That really isn't a PHP question at all since you'll need to use JavaScript to accomplish that. Try asking over in the JavaScript forum.
    Dave .... HostMonster for all of your hosting needs

    Comment

    Working...
    X