I am trying a javascript onchange method I am new in coding. What I want when I select ID Type the input text to change to passport and when I select South African ID the input to change to South African ID here is a code. The passport field its hidden once I select a password, South African ID must change in the passport
<div class="editor-label"><label for="IDType">ID Type:</label></div>
<div class="editor-field"><select class="editor-dropdown" id="IdType" name="IDType">
<option value="SouthAfricanId">South African ID</option>
<option value="Passport">Passport</option>
<input id="Passport" name="Passport" type="hidden" value="True">
</div>
<div class="editor-label">
<label id="lbIDValue">South African ID:</label>
</div>
<div class="editor-field">
<input class="textbox" id="txIdValue" maxlength="13" name="IDValue" type="text" value="">
</div>