Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to validate

 
Raj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All experts,
Here is my code:

<html:select style="margin-left: 15px; width: 120px" property="type" >
<html ption value="<%="" + P.FieldType._FIELD_TEXT %>">Text</html ption>
<html ption value="<%="" + P.FieldType._FIELD_INTEGER%>">Number</html ption>
<html ption value="<%="" + P.FieldType._FIELD_FLOAT %>">Fraction</html ption>
<html ption value="<%="" + P.FieldType._FIELD_DATE %>">Date</html ption>
<html ption value="<%="" + P.FieldType._FIELD_TIME %>">Time</html ption>
<html ption value="<%="" + P.FieldType._FIELD_DATETIME%>">DateTime</html ption>
<html ption value="<%="" + P.FieldType._FIELD_CHECKBOX %>">CheckBox</html ption>
<html ption value="<%="" + P.FieldType._FIELD_POPUP >">Popup</html ption>
</html:select>
<tr>
<td><html:checkbox property="mandatory" style="margin-left: 15px"/></td>
</tr>
When i select CheckBox From Option value i want my checkBox Should be disabled else enable.
How to do this.Please help...
Thanks,
Rama.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34681
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want this to happen when you first load the JSP (struts) or when the user changes something (Javascript) ?
 
Raj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello expert,
Thanks For Reply .I want this when user change option value(Java Script).
thanks rama.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will want to use the onchange event of your select element to call javaScript code that will either enable or disable the checkbox based on the value of the selected option.
 
Raj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Maril !

I solve this one by using javascript nchange();
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic