Click here to Skip to main content
15,888,210 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hai i have

one simple radio buttion list like this

XML
<td>
                            <asp:RadioButtonList ID="rb_Question1" runat="server" ValidationGroup="req" Height="16px"
                                RepeatColumns="2" Width="220px"    >
                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                <asp:ListItem Text="No" Value="0"></asp:ListItem>
                            </asp:RadioButtonList>
                        </td>




when user click on the No button based on no button Textbox comments will be required

my textbox is as follows





XML
<tr>
                        <td align="right"><b>Comments:</b></td>
                        <td colspan="2" class="row">
                            <div class='textAreaDiv'>
                                <asp:TextBox ID="ReviewerDecsion_txt" class="border" runat="server" TextMode="MultiLine" Width="800px" Height="120px"></asp:TextBox>
                                <asp:CustomValidator ID="cv_ReviewerDecsion_txt" runat="server"  ValidateEmptyText="true"

                                ClientValidationFunction="ReviewerDecsiontxt" ErrorMessage="Enter text for Approve this applicant to become a surveyor?"
                                ForeColor="Red" Text="*"  ValidationGroup="req"></asp:CustomValidator>
                            </div>
                        </td>



i WANT cUSTOMER Validation for this


my scirpt is as follows it is not working


C#
function ReviewerDecsiontxt(sender, args) {
            var radbtn1 = $("#cphMaster_rb_Question1_0");
            var radbtn2 = $("#cphMaster_rb_Question1_1");
            var ReviewerTxtbox = $("#ReviewerDecsion_txt");
            if ((radbtn1[0].checked ) &&(ReviewerTxtbox.text)!= "")
            { args.IsValid = true; }
            else { args.IsValid = false; }

               }
Posted
Comments
sjelen 5-Feb-13 7:45am    
What is the question? What exactly isn't working? What have you tried? Improve your question.
Sandeep Mewara 5-Feb-13 12:48pm    
Are you getting correct objects in your jQuery? What do you see in debug?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900