Skip to content Skip to sidebar Skip to footer

How To Use Javascript To Include Struts Html Tag?

I have a check box and a text box. I have used struts tags and Now i need to validate that if the check box is checked, i should gray out (disable) the text box. If it is uncheck

Solution 1:

OK - now it's easier to understand - thanks. 1. make sure that use the styleId - attribute within your for the input-field. To set this input field readonly your javascript code should do:

document.getElementById("line1").setAttribute("readonly","true");

hope that helps

Solution 2:

HI DJ,

do you get an error message for your 2nd javascript snippset? Also could post a little bit more code. From these few lines it's hard to see if text will be " or undefined. Anyway if you disable the textarea take into account that the input may not be posted.

Post a Comment for "How To Use Javascript To Include Struts Html Tag?"