jquery - How to use Javascript to submit the form? -
jquery - How to use Javascript to submit the form? -
<?php echo form::open(array('method' => 'post', 'id' => 'form_public')); ?> <?php echo form::csrf(); ?> <?php echo form::hidden('publish_flag', \model_item_review::publish); ?> <?php echo form::submit('submit', 'submit', array('id'='public'))?> <?php echo form::close(); ?>
below js code, modal popup window used alert.
<button class="btn btn-flat-danger modal-btn-primary btn-block" data-dismiss="modal" id="do_confirm">yes</button> $('#public').click(function(e){ e.preventdefault(); $('#warning_modal').html('are sure?'); $('#confirmmodal').modal('show'); $('#do_confirm').click(function(){ $('#form_public').submit(); }); });
when click yes shows such error:uncaught typeerror: object not function
why can't submit form?thanks lot.
change
<?php echo form::submit('submit', 'submit', array('id'='refuse'))?>
to this
<?php echo form::submit('submit', 'submit', array('id'='public'))?>
javascript jquery twitter-bootstrap
Comments
Post a Comment