I wrote some code, which generates a form using PHP. I want to use javascript (line 57) to make more changes - by choosing something from dropdown menu (127 line):
If I select value "range", I want to generate two more inputs in the form, just next to the row.
This is how I want it to look like
// Javascript
$(function() {
$("#select1").on("change",function() {
var value = this.value;
document.getElementById('a').innerHTML = value;
});
});
// HTML
<select onchange="select(this.value)" id="select1" name="type$i" size="1">
<option value="max">Maximum the best</option>
<option value="min">Minimum the best</option>
<option value="range">Range</option>
</select>
(57 line)and(127 line)meant to mean..?if(this.value==="range") displayTheTwoInputs(), something like that