html:select disabling problem
hi dears,
i have jsp page which contains two html:select tags, one is for Id Number and 2nd is Id State. Id Nubmer contains three options, and Id State is dependent on Id Number, means when third option of Id Number is selected Id State becomes disabled, otherwise not.
First time the javascript for disabling Id State runs correctly but when page is submitted and in any other error case this page reloads, the Id State doesn't disabled, it is enable but when page was submitted Id State was disabled, can anybody gives me the solution how Id State will be disabled when page is reloads,
if you tell me the js/html event it will be feasible for me because it fulfills client's requirments.
thanks in advance
> hi dears,
Hi
> if you tell me the js/html event it will be feasible for me because it fulfills client's requirments.
It will be a JS function call at the bottom of your page. So call the same function for which you disabled the respective combo boxes so that when page loads it calls the function automatically.
......your blah..blah..blah code here
........
</body>
<script>
yourFunction();
</script>
</html:html>
Cheers
-Rohit
> but dear i have mentioned tell me html/js event(s),
My dear ;-)
Probably you are thinking of something like the onLoad event of body. In this case Html/js event wont help you since until the browser completes the generation of lines of your page you cannot access the form objects. Which means that you can only use them or set them after the page interpretation by browser is done.
> but in this case i need to write extra code that is
> not accepted by client. so can u give me the
> alternative solution.
Who is wrting extra code my dear ..you are invoking the same fucntion which you coded for enabling/disabling the comboboxes. The client is being unreasonable or rather you could not technically convince your client.
> the solution you have given me i have already idea.
>
I think you should have gone ahead with this. Else its your choice to wait for more replies ..
All the best
>
> thanks
Welcome
-Rohit