toplisek
12-11-2006, 12:01 PM
I have the following code to implement visible for List box country:
<select onChange="with (document.getElementById('statedb').style) { if(this.options[this.selectedIndex].value == 'USA') { visibility = 'visible' ; height='37px'; }else{visibility = 'hidden' ; height='0px'; } } " name="country" class="inputfield" onFocus="activatefield(this);" onBlur="deactivatefield(this)">
If I would like to hide state I have the following code:
<div name="state" id="statedb" style="visibility:hidden;height:0px" >
....
</div>
as I have also othe list boxes, need help how to automatic change height if user decides for country USA?
code can be example like:
<div class="row1"><span class="fieldtext">
Phone</span></div>
<div style="background-color:#FFFFFF;height:3px"></div>
<div>
<input name="phone" value="<?echo $phonedb?>" class="inputfield" maxlength="40" >
</div>
<div style="background-color:#FFFFFF;height:3px"></div>
Please help how to change height if user decides for USA? :)
<select onChange="with (document.getElementById('statedb').style) { if(this.options[this.selectedIndex].value == 'USA') { visibility = 'visible' ; height='37px'; }else{visibility = 'hidden' ; height='0px'; } } " name="country" class="inputfield" onFocus="activatefield(this);" onBlur="deactivatefield(this)">
If I would like to hide state I have the following code:
<div name="state" id="statedb" style="visibility:hidden;height:0px" >
....
</div>
as I have also othe list boxes, need help how to automatic change height if user decides for country USA?
code can be example like:
<div class="row1"><span class="fieldtext">
Phone</span></div>
<div style="background-color:#FFFFFF;height:3px"></div>
<div>
<input name="phone" value="<?echo $phonedb?>" class="inputfield" maxlength="40" >
</div>
<div style="background-color:#FFFFFF;height:3px"></div>
Please help how to change height if user decides for USA? :)