Hi Ivana,
Ok, I am still having difficulties with CustomValidator. Basically I have a RadNumericTextBox field where the recurrence interval is to be entered and series of checkboxes for days for the week. If they check one of the checkboxes and forget to enter interval I want to display an error message. Here is the code I am trying to integrate:
<
table
cellpadding
=
"0"
cellspacing
=
"0"
border
=
"0"
>
<
tr
>
<
td
colspan
=
"4"
style
=
"font-family: Arial; font-size: 8pt; padding-left: 5px; width: 100%;"
>
Recur every
<
telerik:RadNumericTextBox
ID
=
"txtRecInterval"
runat
=
"server"
Type
=
"Number"
ShowSpinButtons
=
"True"
NumberFormat-DecimalDigits
=
"0"
MinValue
=
"1"
Width
=
"50px"
Height
=
"10"
TabIndex
=
"10"
>
</
telerik:RadNumericTextBox
>
week(s) on
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:CheckBox
ID
=
"chkRecMon"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Monday</
span
>
</
td
>
<
td
style
=
"padding-left: 5px;"
>
<
asp:CheckBox
ID
=
"chkRecTue"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Tuesday</
span
>
</
td
>
<
td
style
=
"padding-left: 5px;"
>
<
asp:CheckBox
ID
=
"chkRecWed"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Wednesday</
span
>
</
td
>
<
td
style
=
"padding-left: 5px;"
>
<
asp:CheckBox
ID
=
"chkRecThu"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Thursday</
span
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:CheckBox
ID
=
"chkRecFri"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Friday</
span
>
</
td
>
<
td
style
=
"padding-left: 5px;"
>
<
asp:CheckBox
ID
=
"chkRecSat"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Saturday</
span
>
</
td
>
<
td
style
=
"padding-left: 5px;"
>
<
asp:CheckBox
ID
=
"chkRecSun"
runat
=
"server"
Width
=
"20px"
/><
span
style
=
"vertical-align: sub; font-family: Arial; font-size: 8pt;"
>Sunday</
span
>
</
td
>
<
td
>
<
asp:CustomValidator
ID
=
"cval1"
runat
=
"server"
ErrorMessage
=
"Please enter Interval!"
ControlToValidate
=
"txtRecInterval"
ClientValidationFunction
=
"validationFunction"
SetFocusOnError
=
"true"
></
asp:CustomValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"4"
style
=
"height: 10px; vertical-align: middle; width: 100%;"
>
<
hr
style
=
"width : 282px;"
/>
</
td
>
</
tr
>
</
table
>
And here is the Javascript: