how can desable and enable the input filed based on option
-
Hi every one can any one help(using asp,vbscripts) its urgent i wants to slect option from combo when select type is floppy and cd then enput type is enable if select type is cabinate then desable thanks in advance to response regards sanjeev jha
sanjeev
-
Hi every one can any one help(using asp,vbscripts) its urgent i wants to slect option from combo when select type is floppy and cd then enput type is enable if select type is cabinate then desable thanks in advance to response regards sanjeev jha
sanjeev
Put onChange="Javascript: disableInputFields()" in your select field then put the following JS and chnage names of fields/form and so on.. function disableInputFields() { if (document.Form1.ddltype.value == "cabinate") document.Form1.inputName.disabled=true; else document.Form1.inputName.disabled=false; } hope it helps
-
Put onChange="Javascript: disableInputFields()" in your select field then put the following JS and chnage names of fields/form and so on.. function disableInputFields() { if (document.Form1.ddltype.value == "cabinate") document.Form1.inputName.disabled=true; else document.Form1.inputName.disabled=false; } hope it helps
Hi Thanks to reply my problems is here when the option 1 selected and added on next addtion it not work for 2, and 3 position but my need is selection depends on user so it have to work fedomeally becouse in one requestion user can submit request with all option it work when first visble option is selected [code] function toggle_state(obj) { // here we check the value of your select-box var val = obj.value == 1; var input_node = document.getElementById('purpose'); input_node.style.visibility = val ? 'hidden' : 'visible'; } <input type="text" name="purpose" style="visibility:hidden; width:400px" maxlength="150" value=<%=porpose%>> [/code]
sanjeev