Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Please change only the name of the function; no other change is required</p> <pre><code>&lt;script&gt; function totalbandwidthresult() { alert("fdf"); var fps = Number(document.calculator.fps.value); var bitrate = Number(document.calculator.bitrate.value); var numberofcameras = Number(document.calculator.numberofcameras.value); var encoding = document.calculator.encoding.value; if (encoding = "mjpeg") { storage = bitrate * fps; } else { storage = bitrate; } totalbandwidth = (numberofcameras * storage) / 1000; alert(totalbandwidth); document.calculator.totalbandwidthresult.value = totalbandwidth; } &lt;/script&gt; &lt;form name="calculator" class="formtable"&gt; &lt;div class="formrow"&gt; &lt;label for="rcname"&gt;RC Name&lt;/label&gt; &lt;input type="text" name="rcname"&gt; &lt;/div&gt; &lt;div class="formrow"&gt; &lt;label for="fps"&gt;FPS&lt;/label&gt; &lt;input type="text" name="fps"&gt; &lt;/div&gt; &lt;div class="formrow"&gt; &lt;label for="bitrate"&gt;Bitrate&lt;/label&gt; &lt;input type="text" name="bitrate"&gt; &lt;/div&gt; &lt;div class="formrow"&gt; &lt;label for="numberofcameras"&gt;Number of Cameras&lt;/label&gt; &lt;input type="text" name="numberofcameras"&gt; &lt;/div&gt; &lt;div class="formrow"&gt; &lt;label for="encoding"&gt;Encoding&lt;/label&gt; &lt;select name="encoding" id="encodingoptions"&gt; &lt;option value="h264"&gt;H.264&lt;/option&gt; &lt;option value="mjpeg"&gt;MJPEG&lt;/option&gt; &lt;option value="mpeg4"&gt;MPEG4&lt;/option&gt; &lt;/select&gt; &lt;/div&gt;Total Storage: &lt;input type="text" name="totalstorage"&gt;Total Bandwidth: &lt;input type="text" name="totalbandwidth"&gt; &lt;input type="button" value="totalbandwidthresult" onclick="totalbandwidthresult();"&gt; &lt;/form&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.
    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