Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is PHP-preprocessed version of the code, which contains only HTML and JS:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;meta charset="UTF-8"&gt; &lt;form action ="price.php" method="post"/&gt; &lt;form&gt; &lt;p&gt;Symbol : &lt;select name="currency_pair" id="select_pair" onchange="pair_selected()"&gt; &lt;option value="gbp/usd"&gt;GBP/USD&lt;/option&gt; &lt;option value="eur/usd"&gt;EUR/USD&lt;/option&gt; &lt;option value="usd/cad"&gt;USD/CAD&lt;/option&gt; &lt;/select&gt;&lt;/p&gt; &lt;script&gt; var courses = {}; courses['gbp/usd'] = [ 10, 15 ]; courses['eur/usd'] = [ 14, 16 ]; courses['usd/cad'] = [ 21, 23 ]; function pair_selected() { // to change your edits var e = document.getElementById("select_pair"); var pair = e.options[e.selectedIndex].value; var course = courses[pair]; document.getElementById("bid").value = course[0]; document.getElementById("offer").value = course[1]; } window.onload = function() { pair_selected(); } // to init your edits &lt;/script&gt; &lt;p&gt; Date : &lt;input type="datetime" value="1970-01-01 " name="date"/&gt; &lt;/p&gt; &lt;p&gt; Type : &lt;input type="radio" name="type" value="buy"&gt;Buy &lt;input type="radio" name="type" value="sell"&gt;Sell &lt;p&gt; Size : &lt;input type="number"pattern="[0-9]+([\.|,][0-9]+)?" step="0.01"name="size"/&gt;&lt;/p&gt; **&lt;p&gt; Bid Price : &lt;input id="bid" type="number" step="any" readonly name="entry" value="" &gt; Offer Price&lt;input id="offer" type="number" step="any" readonly="yes" name="entry" value="" &gt;&lt;/p&gt;** &lt;p&gt; Stop Loss : &lt;input type="number"step="any" name="stoploss"/&gt;&lt;/p&gt; &lt;p&gt; Take Profit : &lt;input type="number"step="any"name="takeprofit"/&gt;&lt;/p&gt; &lt;input type="submit" value="Submit"/&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Tested and works in IE 8-10, Firefox, Chrome, Opera 15 and Safari</p>
    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