Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. <form action="deletprofil.php" id="form_id" method="post">
  2. <div data-role="controlgroup" data-filter="true" data-input="#filterControlgroup-input">
  3. <button type="submit" name="submit" value="1" class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right" data-icon="delete" aria-disabled="false">Anlegen</button>
  4. <button type="submit" name="submit" value="2" class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right" data-icon="delete" aria-disabled="false">Bnlegen</button>
  5. </div>
  6. </form>
  7.  
  8. <div class="ui-popup-container pop in ui-popup-active" id="popupDialog-popup" tabindex="0" style="max-width: 1570px; top: 2239.5px; left: 599px;">
  9. <div data-role="popup" id="popupDialog" data-overlay-theme="b" data-theme="b" data-dismissible="false" style="max-width:400px;" class="ui-popup ui-body-b ui-overlay-shadow ui-corner-all">
  10. <div data-role="header" data-theme="a" role="banner" class="ui-header ui-bar-a">
  11. <h1 class="ui-title" role="heading" aria-level="1">Delete Page?</h1>
  12. </div>
  13. <div role="main" class="ui-content">
  14. <h3 class="ui-title">Sicher dass Sie das Profil löschen wollen?</h3>
  15. <p>Es kann nicht mehr rückgängig gemacht werden.</p>
  16. <a href="#" id="NOlink" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b">Abbrechen</a>
  17. <a href="#" id="OKlink" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b">OK</a>
  18. </div>
  19. </div>
  20. </div>
  21.  
  22. <script language="javascript" type="text/javascript">
  23. $(function(){
  24. $('#form_id').bind('submit', function(evt){
  25. $form = this;
  26. evt.preventDefault();
  27. $("#popupDialog").popup('open');
  28. $("#NOlink").bind( "click", function() {
  29. $("#popupDialog").popup('close');
  30. });
  31. $("#OKlink").bind( "click", function() {
  32. $("#popupDialog").popup('close');
  33. $( "#form_id" ).submit();
  34. });
  35. });
  36. });
  37. </script>
  38.  
  39. <form action="deletprofil.php" id="form_id" method="post">
  40. <div data-role="controlgroup" data-filter="true" data-input="#filterControlgroup-input">
  41. <button type="submit" value="1" class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right" data-icon="delete" aria-disabled="false">Anlegen</button>
  42. <button type="submit" value="2" class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right" data-icon="delete" aria-disabled="false">Bnlegen</button>
  43. </div>
  44. </form>
  45.  
  46. $(function(){
  47. $("#NOlink, #OKlink").on("click", function(e) {
  48. e.preventDefault();
  49. $("#popupDialog").popup('close');
  50. if (this.id=="OKlink") document.getElementById("form_id").submit();
  51. });
  52.  
  53. $('#form_id').on('submit', function(e){
  54. e.preventDefault();
  55. $("#popupDialog").popup('open');
  56. });
  57. });
  58.  
  59. <form action="deletprofil.php" id="form_id" method="post">
  60. <input type="hidden" id="whichdelete" name="whichdelete" value="" />
  61. <div data-role="controlgroup" data-filter="true" data-input="#filterControlgroup-input">
  62. <button type="button" value="1" class="delete ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right" data-icon="delete" aria-disabled="false">Anlegen</button>
  63. <button type="button" value="2" class="delete ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-right" data-icon="delete" aria-disabled="false">Bnlegen</button>
  64. </div>
  65. </form>
  66.  
  67. $(function(){
  68. $("#NOlink, #OKlink").on("click", function(e) {
  69. e.preventDefault();
  70. $("#popupDialog").popup('close');
  71. if (this.id=="OKlink") document.getElementById("form_id").submit();
  72. });
  73. $(".delete").on("click", function(e) {
  74. $("#whichdelete").val(this.value);
  75. });
  76. $('#form_id').on('submit', function(e){
  77. e.preventDefault();
  78. $("#popupDialog").popup('open');
  79. });
  80. });
  81.  
  82. $( "#form_id" )[0].submit();
  83.  
  84. $form.submit();//declare `$form as a local variable by using var $form = this;
  85.  
  86. document.formName.submit().
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement