The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Throw Error Message If Checkbox Not Checked JS.

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #183441

    I am working with bootstrap 3. And I have a form that I would like if the person has not clicked on check box and clicks on input button then it would throw a error. Is there a js that will let me use boot strap alert alert-danger

    Other wise if checked box it check it will redirect to setting url.

    <form action=”” method=”post”>

    <table class=”table table-hover table-condensed table-bordered”>
    <td class=”text-left”>Checked</td>
    <td class=”text-left”>Store ID</td>
    <td class=”text-left”>Name</td>
    <td class=”text-right”>URL</td>
    <td class=”text-right”>Edit Websites</td>
    <?php if ($stores) { ?>
    <?php foreach($stores as $store) { ?>

    <td class=”text-center”>
    <input type=”checkbox” name=”store” />

    <td class=”text-center”><b><?php echo $store[‘store_id’];?></b></td>
    <td class=”text-center”><?php echo $store[‘name’];?></td>
    <td class=”text-center”><?php echo $store[‘url’];?> </td>

    <td class=”text-center”>
    <input role=”button” type=”submit” name=”check” class=”btn btn-primary” value=”Edit Website”>

    <?php } ?>
    <?php } else { ?>
    <td class=”text-center” colspan=”4″>NO RESULTS</td>
    <?php } ?>

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.