如何验证coda滑块内的控件?

我有一个带有ASP.NET控件的Coda滑块控件,比如RadionButtonList和TextBox
如下所示

选择 | 换行 | 行号
  1.   <div class="panel" title="Mandatory" id="panel1">
  2.                     <div class="wrapper">
  3.                         <h3>
  4.                             Mandatory</h3>
  5.                         <div>
  6.                             <br />
  7.                             <br />
  8.                             <br />
  9.                             <br />
  10.                             <table class="style1">
  11.                                 <tr>
  12.                                     <td>
  13.                                         <div class="main">
  14.                                             <asp:RadioButtonList ID="rdodb" runat="server" class="rdo" ValidationGroup="panel1">
  15.                                                 <asp:ListItem>Science</asp:ListItem>
  16.                                                 <asp:ListItem>Commerce Academic</asp:ListItem>
  17.                                                 <asp:ListItem>Commerce Vocational</asp:ListItem>
  18.                                             </asp:RadioButtonList>
  19.                                         </div>
  20.                                     </td>
  21.                                 </tr>
  22.                             </table>
  23.                             <br />
  24.                             <br />
  25.                             <br />
  26.                             <br />
  27.                             <br />
  28.                             <br />
  29.                             <br />
  30.                             <br />
  31.                         </div>
  32.                         <div class="mannxtbtn">
  33.                             <p>
  34.                                 | <a href="#2" id="sld1" runat="server" class="cross-link" title="Go to Panel 2"
  35.                                     onclick="test()">Next »</a>
  36.                                 <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="test()">LinkButton</asp:LinkButton>
  37.                             </p>
  38.                         </div>
  39.                     </div>
  40.                 </div>
  41.                 <div class="panel" title="Personal" id="panel2">
  42.                     <div class="wrapper">
  43.                         <h3>
  44.                             Personal</h3>
  45.                         <table class="style1" align="center">
  46.                             <tr>
  47.                                 <td>
  48.                                     <asp:Label ID="Label1" runat="server" Text="Register No." class="lbl"></asp:Label>
  49.                                 </td>
  50.                                 <td>
  51.                                     <asp:TextBox ID="txtregno" runat="server" class="txtbox" ValidationGroup="panel2">
  52.                                     </asp:TextBox>
  53.                                 </td>
  54.                                 <td>
  55.                                 </td>
  56.                                 <td>
  57.                                 </td>
  58.                             </tr>
  59.                             <tr>
  60.                                 <td>
  61.                                     <asp:Label ID="Label2" runat="server" class="lbl" Text="Name"></asp:Label>
  62.                                 </td>
  63.                                 <td>
  64.                                     <asp:TextBox ID="txtname" runat="server" class="txtbox" ValidationGroup="panel2">
  65.                                     </asp:TextBox>
  66.                                 </td>
  67.                                 <td>
  68.                                     <asp:Label ID="Label3" runat="server" Text="Date of Birth" class="lbl"></asp:Label>
  69.                                 </td>
  70.                                 <td>
  71.                                     <asp:TextBox ID="txtdob" runat="server" class="txtbox" ValidationGroup="panel2">
  72.                                     </asp:TextBox>
  73.                                 </td>
  74.                             </tr>
  75.                             <tr>
  76.                                 <td>
  77.                                     <asp:Label ID="Label4" runat="server" Text="Gender" class="lbl"></asp:Label>
  78.                                 </td>
  79.                                 <td>
  80.                                     <asp:RadioButtonList ID="genrdo" runat="server" class="rdo" RepeatDirection="Horizontal"
  81.                                         ValidationGroup="panel2">
  82.                                         <asp:ListItem>Male&nbsp;&nbsp;</asp:ListItem>
  83.                                         <asp:ListItem>Female&nbsp;&nbsp;</asp:ListItem>
  84.                                     </asp:RadioButtonList>
  85.                                 </td>
  86.                                 <td>
  87.                                     <asp:Label ID="Label5" runat="server" Text="Religion" class="lbl"></asp:Label>
  88.                                 </td>
  89.                                 <td>
  90.                                     <asp:DropDownList ID="drpdnrel" runat="server" class="drpdn" ValidationGroup="panel2">
  91.                                         <asp:ListItem>&lt;---Select---&gt;</asp:ListItem>
  92.                                         <asp:ListItem>Hindhu</asp:ListItem>
  93.                                         <asp:ListItem>Muslim</asp:ListItem>
  94.                                         <asp:ListItem>Christian</asp:ListItem>
  95.                                     </asp:DropDownList>
  96.                                 </td>
  97.                             </tr>
  98.                             <tr>
  99.                                 <td>
  100.                                     <asp:Label ID="Label6" runat="server" Text="Community" class="lbl"></asp:Label>
  101.                                 </td>
  102.                                 <td colspan="2">
  103.                                     <asp:RadioButtonList ID="comrdo" runat="server" class="rdo" RepeatDirection="Horizontal"
  104.                                         ValidationGroup="panel2">
  105.                                         <asp:ListItem>OC&nbsp;&nbsp;</asp:ListItem>
  106.                                         <asp:ListItem>BC&nbsp;&nbsp;</asp:ListItem>
  107.                                         <asp:ListItem>BCM&nbsp;&nbsp;</asp:ListItem>
  108.                                         <asp:ListItem>MBC&nbsp;&nbsp;</asp:ListItem>
  109.                                         <asp:ListItem>SC&nbsp;&nbsp;</asp:ListItem>
  110.                                         <asp:ListItem>SCA&nbsp;&nbsp;</asp:ListItem>
  111.                                         <asp:ListItem>ST&nbsp;&nbsp;</asp:ListItem>
  112.                                     </asp:RadioButtonList>
  113.                                 </td>
  114.                                 <td>
  115.                                     &nbsp;
  116.                                 </td>
  117.                             </tr>
  118.                             <tr>
  119.                                 <td>
  120.                                     <asp:Label ID="Label7" runat="server" Text="Address" class="lbl"></asp:Label>
  121.                                 </td>
  122.                                 <td>
  123.                                     <asp:TextBox ID="txtaddrs" runat="server" TextMode="MultiLine" Width="200px" Height="75px"
  124.                                         class="txtbox" ValidationGroup="panel2">
  125.                                     </asp:TextBox>
  126.                                 </td>
  127.                                 <td>
  128.                                 </td>
  129.                                 <td>
  130.                                 </td>
  131.                             </tr>
  132.                         </table>
  133.                         <div class="persnxtbtn">
  134.                             <p>
  135.                                 <a href="#1" id="sld2" runat="server" class="cross-link" title="Go to Panel 1">«
  136.                                     Previous</a> | <a href="#3" id="sld3" runat="server" class="cross-link" title="Go to Panel 3">
  137.                                         Next »</a></p>
  138.                         </div>
  139.                     </div>
  140.                 </div> 

当用户单击下一步或上一步按钮时,我必须验证控件是否为填充格式,然后允许向前或向后.

选择 | 换行 | 行号
  1.   function test() {
  2.           //my operations
  3.  
  4.             return false;
  5.         }

我已经尝试了上面的代码,但仍然幻灯片已经移动到下一个或上一个,我无法控制它.
尾部滑块可以吗?
请帮我克服这个问题..
感谢所有人

# 回答1


您可以添加
退货
OnClick中的关键字.

标签: Javascript

添加新评论