Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]MessageBox YES/NO
Zielonkawy18
post
Post #1





Grupa: Zarejestrowani
Postów: 152
Pomógł: 4
Dołączył: 4.10.2012

Ostrzeżenie: (10%)
X----


Witam

Otóż ma button:

  1. if(isset($_POST['delRecord']))
  2. {
  3. //Code
  4. }


Chciałbym aby po jego kliknięciu wyskoczył MessageBox YES/NO i gdy wcisnę YES wykona się funkcja "Delete(param)", a gdy NO, to wiadomo, brak reakcji...

Pozdrawiam

Podnoszę :-)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Zielonkawy18
post
Post #2





Grupa: Zarejestrowani
Postów: 152
Pomógł: 4
Dołączył: 4.10.2012

Ostrzeżenie: (10%)
X----


  1. <?php
  2. if(isset($_POST['delDriver'])):
  3. ?>
  4. <!doctype html>
  5. <html lang="en">
  6. <head>
  7. <meta charset="utf-8" />
  8. <title>jQuery UI Dialog - Modal confirmation</title>
  9. <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
  10. <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  11. <script src="/resources/demos/external/jquery.bgiframe-2.1.2.js"></script>
  12. <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
  13. <link rel="stylesheet" href="/resources/demos/style.css" />
  14. <script>
  15. $(function() {
  16. $( "#dialog-confirm" ).dialog({
  17. resizable: false,
  18. height:200,
  19. modal: true,
  20. buttons: {
  21. "Delete all items": function() {
  22. $( this ).dialog( "close" );
  23. },
  24. Cancel: function() {
  25. $( this ).dialog( "close" );
  26. }
  27. }
  28. });
  29. });
  30. </script>
  31. </head>
  32. <body>
  33.  
  34. <div id="dialog-confirm" title="Usuwanie rekordu">
  35. <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>Czy na pewno chcesz usunąć rekord?</p>
  36. </div>
  37. </body>
  38. </html>
  39. <?php
  40. endif;
  41. ?>


Na pewno trzeba zmienić akcję "Delete all items"
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 16:20