Note that there are some explanatory texts on larger screens.

plurals
  1. POredirection JQuery
    primarykey
    data
    text
    <p>i did this code : <strong>the file index.php</strong></p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Jeu de dammes&lt;/title&gt; &lt;/head&gt; &lt;style&gt; form { margin-left:500px;margin-top:300px; width:300px } &lt;/style&gt; &lt;body&gt; &lt;form id="formulaire" style="margin-left:100px, padding: 15px" &gt; &lt;table&gt; &lt;tr&gt;&lt;td&gt;&lt;h4&gt; The first player&lt;/h4&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="premier"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;h4&gt; The second player&lt;/h4&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="deuxieme"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt; &lt;button id="action"&gt;Play&lt;/button&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;script src="jquery-1.5.1.js"&gt;&lt;/script&gt; &lt;script&gt; $(function () { $('#action').click(function () { var j1= $('#premier').val(); var j2= $('#deuxieme').val(); if( j1=="") alert('saisir le nom du premier joueur'); if( j2=="") alert('saisir le nom du deuxieme joueur'); if(j2!="" &amp;&amp; j1!="") {$(location).attr('href',"http://www.google.com");} }); $('body').css('background-image', 'url(flower2.jpg)').css('background-size', '100%'); $("#formulaire").css('background-image', 'url(flower.jpg)'); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>my problem is in the event click the redirection to "www.google.com" doesn't work.any suggestions:</p> <ol> <li>what is the cause of this error?</li> <li>how can i correct it?</li> </ol>
    singulars
    1. This table or related slice is empty.
    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.
 

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