首页 新闻 赞助 找找看

大家帮忙看一下对错,谢谢了

0
[已关闭问题] 关闭于 2011-04-08 14:26

我这是在一个用户控件里写了一个jquery.post提交 LeaveWordSuccessList.aspx是用户控件的父页面,但是现在就是进不了这个页面,不知道哪出的问题,请高手帮忙,谢谢了

<script type="text/javascript">
      $(document).ready(function()
     {
        $('#lblMessage').hide();//显示操作提示的元素不可见
        $('#<%=form1.ClientID%>').submit(function()
        {
        alert( $('#<%=form1.ClientID%>').val());
        var options = {
        alert( $('#<%=form1.ClientID%>').val());
        target:'#Tip', //后台将把传递过来的值赋给该元素
        url:'LeaveWordSuccessList.aspx?flag=do', //提交给哪个执行
        type:'POST',
        success: function(){ alert($('#Tip').text());} //显示操作提示
        };
        $('#btnAddLeave').ajaxSubmit(options);
        return false; //为了不刷新页面,返回false,反正都已经在后台执行完了,没事!
        });
        }
    );
</script>

<div class="liuyan">
    <form runat="server" id="form1">
        <table border="0" cellpadding="0" cellspacing="4" id="TABLE1" style="width: 400px">
            <tr>
                <td style="text-align: right">
                    <a id="closeBut" class="nyroModalClose" title="close" href="#">
                        <img class="CancelImg" src="../images/cancel.png" alt="" /></a>
                </td>
            </tr>
            <tr>
                <td style="width: 520px">
                    <asp:Label ID="lbltitle" runat="server" Text="填写留言内容" Font-Bold="true" ForeColor="darkred"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 520px">
                    <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Height="110px"
                        Width="380px" MaxLength="500"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqDescription" runat="server" Display="Dynamic"
                        ErrorMessage="*" ValidationGroup="addleaveword" ControlToValidate="txtDescription">留言内容不能为空</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: DarkRed; font-weight: bold;">姓 名</span>
                    <asp:TextBox ID="txtUser" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUser"
                        ErrorMessage="*" ValidationGroup="addleaveword"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnAddLeave" runat="server" Text="提交"  ValidationGroup="addleaveword"
                        Font-Bold="True" ForeColor="DarkRed" />
                    <asp:Label ID="lblMessage" runat="server" ForeColor="LimeGreen" Text=" 你的留言已成功提交,正在审核中..."
                        Visible="False"></asp:Label>
                    <asp:Label ID="lblError" runat="server" ForeColor="Red" Text="添加失败" Visible="False"></asp:Label></td>
            </tr>
        </table>
    </form>
</div>

程序新青年的主页 程序新青年 | 小虾三级 | 园豆:841
提问于:2010-09-17 13:47
< >
分享
所有回答(2)
0

$('#<%=form1.ClientID%>').submit(...//为什么只有这里知道输出客户端ID呢,其它不也有操作ID的地方吗。

Astar | 园豆:40805 (高人七级) | 2010-09-17 15:03
0

不知道不是路径的问题。

itaozi | 园豆:1055 (小虾三级) | 2010-09-17 21:42
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册