Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function(){
- // setup the modal dialog
- $("#dialog").dialog({
- autoOpen: false,
- modal: true,
- resizable: false
- });
- $("#dialog").dialog({
- buttons: {
- "Yes": function() {
- userConfirmed = true;
- $("#inputform").submit();
- },
- "No, I'll change them.": function() {
- $(this).dialog("close");
- $('#totalDays').focus();
- }
- }
- });
- var userConfirmed = false;
- // check they've submitted what they need to
- $("form").submit(function(e) {
- $("#dialog").dialog("open");
- return userConfirmed;
- });
- });
- </script>
- <form method="POST" action="<?php echo CURRENT_PAGE ?>" name="inputform" id="inputform">
- <div class="buttons">
- <button type="submit" name="submit" id="submit">Submit form</button>
- </div>
- </div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement