Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This part :</p> <pre><code> onSubmit="return confirmSubmit()" </code></pre> <p>should appear inside the <code>&lt;form&gt;</code> tag, not the <code>&lt;input submit&gt;</code> tag. Like this :</p> <pre><code>&lt;form onSubmit="return confirmSubmit()" name="delPlayers" method="post" action="deletePlayer.jsp" class="col6 leftpad3 rightpad3"&gt; </code></pre> <hr> <p><strong>[EDIT]</strong></p> <p>You didn't get it working cause your javascript structure is not as good as needed. I tried to change your code into something like this, and things seem to be better:</p> <pre><code>if (r){ document.forms['delPlayers']["confirmed"].value = r; return true ; }else{ return false ; } </code></pre> <p>Just remember to always use the curly brackets { and } when you write <strong>if</strong> command inside javascript. You're not obliged to use them, but it's a god habit to avoid such nonsensical problem like this.</p> <p><em>Technical note</em> : In JS, the <strong><code>if(condition)</code></strong> without curly brakets {} works with <strong>only 1 line of command</strong> right after it . In your case, there were 2 command, so the "else" statment was illegal. That's the reason why you alway should use if with curly brackets</p> <pre><code>if (condition) foo() else bar() </code></pre> <p>is OK. But </p> <pre><code>if (condition) foo() any_extra_command(); else bar() </code></pre> <p>will cause an error. So the best for all case was :</p> <pre><code>if (condition){ foo(); any_extra_command(); ...... anything_you_want_else(); }else{ bar() } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload