vin23akleh
Programmer
i am having some problem showing and hiding some div
i want to show the div with the id="universitiesDiv" on one point and the div id="highSchoolsDiv" on another depending on the user choice of selected option.
the functions work fine i have tested them on input type="checkbox" and they work fine
here is doesn't do nothing i have tried onblur onfocus onchange onselect everything i even tried then in side the option <option onselect... !!!!!
anyone can help me, that would be great
thanks
i want to show the div with the id="universitiesDiv" on one point and the div id="highSchoolsDiv" on another depending on the user choice of selected option.
Code:
function Show (titleImg){
// the id of the content element from the id of the title element
var contentID = titleImg.id.replace (/title/, "content");
var contentDiv = document.getElementById (contentID);
contentDiv.style.display = "block";
return false;
}
function Hide (titleImg){
// the id of the content element from the id of the title element
var contentID = titleImg.id.replace (/title/, "content");
var contentDiv = document.getElementById (contentID);
contentDiv.style.display = "none";
return false;
}
Code:
<select name="education" id="education"
onchange="Show(this.options[this.selectedIndex].value);">
<option selected value="00">-?????? ????????-</option>
<option value="highSchoolsDiv">????? ??????</option>
<option value="universitiesDiv"> ???? </option>
<option value="universitiesDiv">???? ???????????</option>
<option value="universitiesDiv">???? ????</option>
<option value="universitiesDiv">??????? / ?? ??? ?????????</option>
<option value="07">?????? ???? ???</option>
</select>
</span>
</div>
</td></tr></table>
</div>
<div>
<div class="Left"></div>
<table class="step2" ><tr><td>
<div class="Right">
<div class="Inner" id="Inner">
<div id="universitiesDiv" class="Row innerError" style="display:none;">
<div class="Left">
<label for="universities">??????? / ??????</label></div>
<div class="Right">
<input type="text" name="universities" id="universities" class="text" autocomplete="off" onfocus="focusInput(this);" onchange=" validate_JoinPersonalInfoForm_universities();" onblur="blurInput(this); validate_JoinPersonalInfoForm_universities();" size="55"/>
</div>
</td></tr><tr><td>
</div>
<div id="highSchoolsDiv" class="Row innerError" style="display:none;">
<div class="Left">
<label for="high_schools">??????? ????????</label></div>
<div class="Right">
<input type="text" name="high_schools" id="high_schools" class="text" autocomplete="off" onfocus="focusInput(this);" onchange=" validate_JoinPersonalInfoForm_high_schools();" onblur="blurInput(this); validate_JoinPersonalInfoForm_high_schools();" size="55"/>
</div>
</div>
</div>
</div>
</td></tr></table>
</div>
anyone can help me, that would be great
thanks