Hello
I try to validate two RadComboBox's which are placed inside the EditTemplate of a FormView. The server-side validation is working fine bit the Client-side is giving me troubles.
It looks like that the RadComboBox are not yet available when the JavaScript is loaded. On this row of JavaScript:
var combo = $find("<%= rcbFuelType.ClientID %>");
I get this error message: Unknown identifier "rcbFuelType".
The FormView is part of UserContrle and I have placed the Javascript inside the asp:content tag where the FormView is. I have also tried to place it inside the EditTemplate without any result.
How can I get the this working?
Anders
<script language="javascript" type="text/javascript"> function ClientValidateFueltypes(source, arguments) { var combo = $find("<%= rcbFuelType.ClientID %>"); var combo2 = $find("<%= rcbFuelType2.ClientID %>"); if (combo.get_value() == "N.v.t.") { if (combo2.get_value() == "N.v.t.") { arguments.IsValid = false; } } }</script>