I have 4 Radio buttons but depending on your selection of a dropdown will affect what to show. My question is how can I make them show in the same place. E.g when the first two show up it looks great, but when the second two show up they show with a space as if the first two are still there only invisible. So I want no matter what two show, they will be in the same position.
Here is some of the code I'm using.
HTML:
<div id="rdtrue" style="float: left; padding-left:10px; text-align:left; vertical-align:text-top;">
<input type="radio" class="classRt classLR" name="requestType" id="rdNew" value="New">
<label for="rdNew" class="classRt classLR">New</label><br>
<input type="radio" class="classRt classLR" name="requestType" id="rdSecond" value="Existing">
<label for="rdSecond" class="classRt classLR">Second</label><br>
<input type="radio" class="classRt classInv" name="requestType" id="tdVW" value="Paper">
<label for="rdVW" class="classRt classInv">VW</label><br>
<input type="radio" class="classRt classInv" name="requestType" id="rdFord" value="Plastic">
<label for="rdFord" class="classRt classInv">Ford</label><br>
</div>
<select id="ddlRequestType" onchange="GetChoice(this.value);">
<option value="MISSING" selected>Select</option>
<option value="Inventory">Inventory</option>
<option value="Letter">Letter</option>
<option value="Report">Report</option>
</select>
Javascript:
function hideClass(val) {
var cls = document.getElementsByClassName(val);
var i;
for (i = 0; i < cls.length; i++) {
cls[i].style.display = 'none';
}
}
function showClass(val) {
var cls = document.getElementsByClassName(val);
var i;
for (i = 0; i < cls.length; i++) {
cls[i].style.display = 'inline';
}
}