隨筆-9  評論-168  文章-266  trackbacks-0

          <%
           ServletContext sc = request.getSession().getServletContext();
           ApplicationContext ac = WebApplicationContextUtils
             .getWebApplicationContext(sc);
           FourmService fs = (FourmService) ac.getBean("fourmService");
           String c = request.getParameter("command");
           if (c == null)
            return;
           if (c.equals("notDetail")) { //論壇概述調用

            out.print(fs.showfourm());
           } else if (c.equals("isDetail")) { //論壇詳細內容調用
            String title = request.getParameter("title");
            String identity = request.getParameter("identity");
            out.print(fs.showfourm(title, identity));
           } else if (c.equals("insert")) {
            String[] t = new String[4];
            t[0] = "title";//request.getParameter("title");
            t[1] = "底盤部門";//request.getParameter("identity");
            t[2] = "底盤作者";//request.getParameter("author");
            t[3] ="底盤詳細內容"; //request.getParameter("detail");
            
            fs.insertjson(t);
            out.print("{success:true,msg:'添加成功!'}");  //必須指定{success:true'},他傳回EXTJS調用成功,否則EXTJS卡住無法執行;如果沒有這行代碼即為報"SYNTAX ERROR:)"錯.他還能傳任意參數如MSG回EXTJS.
           }
          %>

          posted on 2008-09-02 16:57 紫蝶∏飛揚↗ 閱讀(2490) 評論(1)  編輯  收藏 所屬分類: EXTJS重點

          評論:
          # re: EXTJS 一般提交表單時, 出現奇怪的"SYNTAX ERROR: )"錯誤 2014-08-06 16:17 | 21
          ewe  回復  更多評論
            
          主站蜘蛛池模板: 长沙县| 乌兰察布市| 蓝田县| 台东县| 米泉市| 长葛市| 多伦县| 县级市| 桐梓县| 江口县| 宁波市| 新丰县| 南木林县| 东乌珠穆沁旗| 巴中市| 梅河口市| 郯城县| 九龙坡区| 岗巴县| 高要市| 泌阳县| 亳州市| 宝应县| 香河县| 仲巴县| 恩施市| 阿城市| 宜兰市| 沙坪坝区| 望奎县| 昭苏县| 福州市| 申扎县| 金乡县| 凉山| 宁国市| 沁阳市| 伊宁县| 时尚| 鲁山县| 江口县|