Jelajahi Sumber

Disable Form onSubmit

Axel Nordh 4 tahun lalu
induk
melakukan
6c3d353f5b
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      OddsJavaFx/src/web/matchTable.php

+ 2 - 2
OddsJavaFx/src/web/matchTable.php

@@ -41,7 +41,7 @@ $betMarginAway = 1 + ($leagueInfo['betMarginAway'] / 100);
     <tbody>
 <?php 
     foreach ($matches as $match) {
-        echo "<form id='makeBetFormId' action='makeBet.php' method='post' target='hiddenFrame'>";
+        echo "<form id='makeBetFormId' action='makeBet.php' method='post' target='hiddenFrame' onSubmit='document.getElementById('submit').disabled=true;'>";
         echo "<tr>";
         echo "<td hidden><input hidden id='gameId' name='gameIdName' value='" . $match['id'] . "'/>";
         echo "<td>".$match['gameDate'] . "</td>";
@@ -57,7 +57,7 @@ $betMarginAway = 1 + ($leagueInfo['betMarginAway'] / 100);
             </select></td>";
         echo "<td><input id='betOdds' name='betOddsName' type='number' step='.01'/></td>";
         echo "<td><input id='betAmount' name='betAmountName' type='number' step='.01'/></td>";
-        echo "<td><input id='button' type='submit' onClick='this.disabled=true'/></td>";
+        echo "<td><input id='button' type='submit'/></td>";
         echo "</form>";
         echo "</tr>";
     }