Advertisement
Brandan

Untitled

May 13th, 2015
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ============= This code does not work, however, it works on every browser except IE11 (11.0.9600.17728) =============
  2. <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
  3. <input onClick="dispatchAll()"  type="button" id="Btn2" value="Dispatch All Units" class="btnStyle span3" />
  4. <script type="text/javascript">
  5. function dispatchAll() {
  6.     $.post("#",
  7.             {
  8.                 dispatchAllUnits: true
  9.             },
  10.     function (data) {
  11.  
  12.     }
  13.     );
  14.     return false;
  15. }
  16. </script>
  17.  
  18. ============= This code works =============
  19. <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
  20. <input onClick="dispatchAll()"  type="button" id="Btn2" value="Dispatch All Units" class="btnStyle span3" />
  21. <script type="text/javascript">
  22. function dispatchAll() {
  23.     $.ajax({
  24.         type: "POST",
  25.         url: 'index.php',
  26.         data: {
  27.             dispatchAllUnits: true
  28.         },
  29.         success: function () {
  30.  
  31.         },
  32.         error: function () {
  33.             alert('dispatchAll() failure');
  34.         }
  35.     });
  36.     return false;
  37. }
  38. </script>
  39.  
  40. ============= Some more notes =============
  41. For the second code it refused to work with # on IE, however, that's not a big deal ill  just type index.php instead.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement