新弹出窗口打开时获取脚本错误

时间:2013-06-12 06:32:37

标签: javascript asp.net sql-server-2008

我目前正在开发一个网站应用程序,在该应用程序中打开一个新的弹出窗口时,我收到脚本错误。所以你可以帮我解决一下吗??! 它告诉我在Default / selectedItems.aspx中发生了错误。

 function getBkLOV() {
        var langId = '<%=strLangId %>';
        var drpStd = document.getElementById('<%=drpStd.ClientID %>');
        var drpMed = document.getElementById('<%=drpMedium.ClientID %>');
        var ParamA = 'BOOK_ID';

        var ParamB = "  SELECT  b.BOOK_CD AS 'Book_Code' ,  " +
                "           b.BOOK_NM AS 'Book_Name' ,  " +
                "           s1.STD_NM AS 'Standard' ,   " +
                "           m1.MEDIUM_NAME AS 'Medium' ,    " +
                "           cd1.CD_VAL_NM AS 'Book_Type' , " +
                "           CAST(b.PCKG_SIZE AS VARCHAR) AS 'Packing' , " +
                "           CAST(b.BOOK_PRICE AS VARCHAR) AS 'Price',   " +
                "           case b.SEMESTER when '1' then '1'  when '2' then '2'  when '3' then 'Not Applicble'  when '4' then 'Non Semester' else 'Not Applicble' end as Semester," +
                "           case b.BOOK_TYPE  when 'F' then 'Free' when 'P' then 'Price' else 'null' end as Type " +
                "   FROM    M_BOOK a    " +
                "           LEFT JOIN dbo.M_BOOK b ON ( a.BOOK_CD = b.BOOK_CD   " +
                "                                       AND b.LANG_ID = " + langId + "  " +
                "                                     ) " +
                "           LEFT JOIN M_STANDARD s ON ( s.STD_ID = b.STD_ID )   " +
                "           LEFT JOIN M_STANDARD s1 ON ( s1.STD_CD = s.STD_CD   " +
                "                                        AND s1.LANG_ID = " + langId + "    " +
                "                                      )    " +
                "           LEFT JOIN M_MEDIUM m ON ( m.MEDIUM_ID = b.MED_ID )  " +
                "           LEFT JOIN dbo.M_MEDIUM m1 ON ( m1.MEDIUM_CD = m.MEDIUM_CD   " +
                "                                          AND m1.LANG_ID = " + langId + "  " +
                "                                        )  " +
                "           LEFT JOIN dbo.M_CODE cd ON (cd.CD_ID = b.BOOK_TYPE_ID) " +
                "           LEFT JOIN dbo.M_CODE cd1 ON (cd.code_value = cd1.code_value AND cd1.LANG_ID = " + langId + " ) " +
                "   WHERE   a.LANG_ID = 1   ";
        if (drpStd.selectedIndex != 0) {
            ParamB += "and b.STD_ID=" + drpStd.options[drpStd.selectedIndex].value + " ";
        }
        if (drpMed.selectedIndex != 0) {
            ParamB += "and b.MED_ID=" + drpMed.options[drpMed.selectedIndex].value + " ";
        }
        var ParamC = 'Book_Code$Book_Name$Standard$Medium$Book_Type$Packing$Price$Type$Semester';
        var ParamD = '';
        var ParamE = '3';
        var myargs = new Array(ParamA, ParamB, ParamC, ParamD, ParamE);
        var MyArgs1 = window.showModalDialog('<%=ConfigurationManager.AppSettings["siteurl"] %>Default/SelectedItem.aspx', myargs, "dialogwidth=900px,dialogheight=100px,left=200px,top=150px,scrollbars=yes,status=no,titlebar=no,toolbar=no,menubar=no,location=no");
        if (MyArgs1 == null) {
        }
        else {
            var arr = new Array();
            arr = MyArgs1[0].split("$");
            document.getElementById('<%=txtBookCd.ClientID %>').value = arr[0];
            __doPostBack("txtBookCd", TextChaged);
            if (document.getElementById('<%=txtNoBkReq.ClientID %>').value != "")
                getvalue();
        }
        return false;
    }

我正在使用此函数来获取值列表。现在我不知道我在哪里得到错误。 亲切的请帮帮我

0 个答案:

没有答案