Note that there are some explanatory texts on larger screens.

plurals
  1. POif Function is returning the same output
    primarykey
    data
    text
    <p>When the user selects an answer, the code below is supposed to give different results; however, it just gives the same result. Why is it giving the same result when the button is pressed?</p> <pre><code>1.Is the network problem affecting just your pc? &lt;BR&gt; &lt;select id="Area"&gt; &lt;option value="Yes"&gt;Yes&lt;/option&gt; &lt;option value="No"&gt;No&lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;br&gt;&lt;p&gt; 2.Can you access the internet? &lt;BR&gt; &lt;select id="Internet"&gt; &lt;option value="Yes"&gt;Yes&lt;/option&gt; &lt;option value="No"&gt;No&lt;/option&gt; &lt;option value="Yes,but is slow"&gt;Yes,but is slow&lt;/option&gt; &lt;option value="Drop in connection"&gt;Drop in connection&lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;br&gt;&lt;p&gt; 3.Are you receiving any error message saying remote system could not be found or connection has timed out?&lt;BR&gt; &lt;select id="Errors"&gt; &lt;option value="Remote"&gt;Remote system could not be found&lt;/option&gt; &lt;option value="Connection"&gt;Connection has timed out&lt;/option&gt; &lt;option value="No"&gt;No error messages &lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;br&gt;&lt;p&gt; 4.Have you changed any software or Hardware before the problem occurred?&lt;BR&gt; &lt;select id="Change"&gt; &lt;option value="Software"&gt;Software&lt;/option&gt; &lt;option value="Hardware"&gt;Hardware&lt;/option&gt; &lt;option value="Both"&gt;Both&lt;/option&gt; &lt;option value="None"&gt;None &lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;br&gt;&lt;p&gt; &lt;button onclick="myFunction()"&gt;Detect&lt;/button&gt; &lt;p id="Solution"&gt;&lt;/p&gt; &lt;script&gt; function myFunction() { var AreaElem = document.getElementById("Area"); var Area = AreaElem.options[AreaElem.selectedIndex].value; var InternetElem = document.getElementById("Internet"); var Internet= InternetElem.options[InternetElem.selectedIndex].value; var ErrorsElem = document.getElementById("Errors"); var Errors= ErrorsElem.options[ErrorsElem.selectedIndex].value; var ChangeElem = document.getElementById("Change"); var Change= ChangeElem.options[ChangeElem.selectedIndex].value; if (Area=="Yes"||Internet=="Yes"||Errors=="No"||Change=="No") { x="check your cable is not cut or loose"; } else if (Area=="Yes"||Internet=="Yes"||Errors=="No"||Change=="Both") { x="network connections "; } else { x="other problems...."; } document.getElementById("Solution").innerHTML=x; } &lt;/script&gt; </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.
 

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