首页 新闻 会员 周边 捐助

继续上面的问题

0
[待解决问题]

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Detail.aspx.cs" MasterPageFile="~/MasterPage.master" Inherits="Products_Detail" EnableViewState="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link rel="stylesheet" href="/HttpCombiner.ashx?f=common.css|product.css|footer.css|message.css|myWin.css|JS/jQuery/thickbox/thickbox.css@amp;&t=css&v=3.9" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <div class="body_box">
   <div class="body_left">
     <div class="location2">您當前的位置:<asp:Literal ID="ltlLocation" runat="server"></asp:Literal></div>
     <asp:Panel ID="pnlHasData" runat="server">
       
   <img src="../Images/qa_header.gif" />
         <div class="message_tip">歡迎光臨,您對“<asp:Label ID="lblProductName2" runat="server" />” 有任何問題,請在這裡提出 </div>
               <div id="message_list"></div>
               <div class="hackbox"></div>
                <div id="postqa">
                <form id="frmPostMessage" action="../Messages/Post.aspx" method="post">
                    <input type="hidden" value="顧客" id="txtUserName" name="txtUserName" />
 <input type="hidden" id="productId2" name="productId" value='<%=id %>' />
                    <div style="padding:5px;">
                        <h3 style="padding:5px; color:#606060">我的問題</h3>
                        <textarea id="txtContent" name="txtContent" cols="100" rows="3" tabindex="1"></textarea>
                        <p style="padding:5px;">
                            <img src="/Image.ashx" id="imgcode" alt="驗證碼" style="cursor:pointer;" onclick="this.src='/Image.ashx?temp='+ (new Date().getTime().toString(36));" />
                            <a href="javascript:document.getElementById('imgcode').src='/Image.ashx?temp='+ (new Date().getTime().toString(36));void(0);">更換別組圖示</a><br />
                            <input type="text" id="txtValidateCode" name="txtValidateCode" tabindex="1" maxlength="6" class="text" style="width:96px" />
       <span id="msgShower" style="position:static"></span>
                        </p>
                        <p style="padding:5px;"><input type="submit" value="確認送出" tabindex="1" class="btnbg" /></p>
                    </div>
                </form>
                </div>
          
  
    <script type="text/javascript" src="../JS/jQuery/thickbox/thickbox.js"></script>
    <script src="../JS/common.js" type="text/javascript"></script>
    <script type="text/javascript">
        var productId = $("#productId2").val();
        $(function() {
            $("#frmPostMessage").submit(function() {           
                post(this.action);
                return false;
            });
            $(document).click(function() { $("#msgShower").hide(); });

            $.ajax({
                type: "GET",
                url: "../Messages/ProductMessage.aspx",
                data: "page=1&productId=" + productId,
                timeout: 120000,
                success: function(msg) {
                    $("#message_list").html(msg);
                },
                error: function(msg) {
                    showError();
                }
            });
        });
        function post(url) {
            var userName = $("#txtUserName").val();
            var content = $("#txtContent").val();
            var validateCode = $("#txtValidateCode").val();

            if (userName.length < 1) { showError2("msgShower", "請輸入您的昵稱。"); return false; }
            if (content.length < 2) { showError2("msgShower", "請輸入留言內容。"); return false; }
            if (validateCode.length < 2) { showError2("msgShower", "請輸入驗證碼。"); return false; }

            showLoading();

            $.ajax({
                type: "POST",
                url: url,
                data: "txtUserName=" + userName + "&txtContent=" + escape(content) + "&txtValidateCode=" + validateCode + "&productId=" + productId,
                timeout: 120000,
                success: function(msg) {
                    showSuccess(msg, "frmPostMessage", "msgShower", "reload", 2000);
                },
                error: function(msg) {
                    showError();
                }
            });
            return false;
        }
        function jump(page) {
            $.ajax({
                type: "GET",
                url: "../Messages/ProductMessage.aspx",
                data: page + "&productId=" + productId,
                timeout: 120000,
                success: function(msg) {
                    $("#message_list").html(msg);
                },
                error: function(msg) {
                    showError();
                }
            });
        }
        function showError() {
            $("#message_list").html("载入失败。");
        }
    </script>
</asp:Content>

坏黑豹的主页 坏黑豹 | 初学一级 | 园豆:2
提问于:2010-08-14 10:42
< >
分享
所有回答(1)
0

代码好多,说明问题出现何处,什么现像。

Astar | 园豆:40805 (高人七级) | 2010-08-14 10:48
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册