久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='ZnjK7'><tr id='ZnjK7'><dt id='ZnjK7'><q id='ZnjK7'><span id='ZnjK7'><b id='ZnjK7'><form id='ZnjK7'><ins id='ZnjK7'></ins><ul id='ZnjK7'></ul><sub id='ZnjK7'></sub></form><legend id='ZnjK7'></legend><bdo id='ZnjK7'><pre id='ZnjK7'><center id='ZnjK7'></center></pre></bdo></b><th id='ZnjK7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZnjK7'><tfoot id='ZnjK7'></tfoot><dl id='ZnjK7'><fieldset id='ZnjK7'></fieldset></dl></div>

    <tfoot id='ZnjK7'></tfoot>
  • <legend id='ZnjK7'><style id='ZnjK7'><dir id='ZnjK7'><q id='ZnjK7'></q></dir></style></legend>

      <small id='ZnjK7'></small><noframes id='ZnjK7'>

        • <bdo id='ZnjK7'></bdo><ul id='ZnjK7'></ul>

        在 PHP 中使用 jqgrid 上傳文件

        File upload with jqgrid in PHP(在 PHP 中使用 jqgrid 上傳文件)
          <bdo id='pQ8C3'></bdo><ul id='pQ8C3'></ul>
            <i id='pQ8C3'><tr id='pQ8C3'><dt id='pQ8C3'><q id='pQ8C3'><span id='pQ8C3'><b id='pQ8C3'><form id='pQ8C3'><ins id='pQ8C3'></ins><ul id='pQ8C3'></ul><sub id='pQ8C3'></sub></form><legend id='pQ8C3'></legend><bdo id='pQ8C3'><pre id='pQ8C3'><center id='pQ8C3'></center></pre></bdo></b><th id='pQ8C3'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='pQ8C3'><tfoot id='pQ8C3'></tfoot><dl id='pQ8C3'><fieldset id='pQ8C3'></fieldset></dl></div>
            1. <small id='pQ8C3'></small><noframes id='pQ8C3'>

              <legend id='pQ8C3'><style id='pQ8C3'><dir id='pQ8C3'><q id='pQ8C3'></q></dir></style></legend>
              <tfoot id='pQ8C3'></tfoot>

                    <tbody id='pQ8C3'></tbody>
                  本文介紹了在 PHP 中使用 jqgrid 上傳文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在嘗試使用 jqgrid 實現(xiàn)文件上傳(在 Zend 框架項目中).jqgrid 允許您創(chuàng)建文件"類型的輸入字段,但不啟用 ENCTYPE=multipart/form-data".

                  I am trying to implement file upload with jqgrid (in a Zend Framework project). jqgrid allows you to create an input field of type "file" but does not enable ENCTYPE="multipart/form-data".

                  作者推薦使用其他插件來處理文件上傳,特別是Ajax File Upload.他說使用 onInitializeForm() 方法初始化它,但我不清楚具體如何做到這一點.他說,

                  The creator recommends using another plugin to handle file uploads, specifically Ajax File Upload. He says to initialize it using the onInitializeForm() method but exactly how to do this is not clear to me. He says,

                  "我建議你也可以使用 Ajax文件上傳插件并初始化它僅在 onInitializeForm 事件中出現(xiàn)一次."

                  "Also as I suggest you can use Ajax file upload plugin and intialize it only once in onInitializeForm event."

                  這就是有關(guān)如何執(zhí)行此操作的說明.

                  And that is about it for instructions on how to do this.

                  到目前為止我所做的:我有顯示文件輸入字段的 jqgrid 編輯表單,并且我已經(jīng)準(zhǔn)備好所有各種插件文件并正確加載.我無法弄清楚如何讓提交的表單正確上傳文件(我想我無法弄清楚如何使用 onInitializeForm 事件初始化 ajax 文件上傳插件").任何想法都非常感謝.

                  What I have done so far: I have the jqgrid edit form displaying the file input field and I have all of the various plugin files in place and loading properly. What I cannot figure out is how to get the submitted form to properly upload the file (I guess I can't figure out how to "initialize the ajax file upload plugin with the onInitializeForm event"). Any ideas are greatly appreciated.

                  我可以讓 onInitializeForm 觸發(fā)一些簡單的東西,比如 alert('test') 但每次加載網(wǎng)格時它都會觸發(fā)越來越多的數(shù)字(比如,第一次什么都沒有,下次加載時一個警報網(wǎng)格,下次有兩個警報,等等).

                  For what it is worth I can get onInitializeForm to trigger something simple like alert('test') but it triggers in growing numbers each time you load the grid (like, nothing first time, one alert the next time you load the grid, two alerts the next time, etc).

                  推薦答案

                  答案如下:

                  <!-- Add your other js files like jQuery, jqGrid etc. -->
                  <script type="text/javascript" src="js/ajaxfileupload.js"></script>
                  <script language="javascript">
                      $(function() {
                          $(document).ready(function() {
                              jQuery("#your_grid_id").jqGrid({
                                  url: 'your_url',
                                  datatype: 'json',
                                  mtype: 'post',
                                  pager: 'your_pager_id',
                                  colNames: ["Description", "File"],
                                  colModel: [{name: "desc", index: "desc", ... ... ...}, {name: "file_to_upload", index: "file_to_upload", edittype: "file", ... ... ...}]
                              }).navGrid("#your_pager_id",{{... ... ...},{
                                  jqModal:true,closeAfterEdit: true,recreateForm:true,onInitializeForm : function(formid){
                                      $(formid).attr('method','POST');
                                      $(formid).attr('action','');
                                      $(formid).attr('enctype','multipart/form-data');
                                  }, afterSubmit : function(response, postdata){
                                         $.ajaxFileUpload({
                                            url: 'your_file_url_where_upload_operates', 
                                            secureuri:false,
                                            fileElementId:'file_to_upload',
                                            dataType: 'json',
                                            success: function (data, status) {
                                                alert("Upload Complete.");
                                            }
                                         });
                                     }
                                  }},{
                                  jqModal:true,closeAfterAdd: true,recreateForm:true,onInitializeForm : function(formid){
                                      $(formid).attr('method','POST');
                                      $(formid).attr('action','');
                                      $(formid).attr('enctype','multipart/form-data');
                                  }, afterSubmit : function(response, postdata){
                                         $.ajaxFileUpload({
                                            url: 'your_file_url_where_upload_operates', 
                                            secureuri:false,
                                            fileElementId:'file_to_upload',
                                            dataType: 'json',
                                            success: function (data, status) {
                                                alert("Upload Complete.");
                                            }
                                         });
                                     }
                                  }
                              });
                          });
                      });
                  </script>
                  

                  我使用 recreateForm: true 來確保在每次添加或編輯時重新創(chuàng)建表單.

                  I used recreateForm: true to ensure that on every Add or Edit the form is re-created.

                  如果您還有問題,請隨時問我.

                  If you have problem yet, please feel free to ask me.

                  這篇關(guān)于在 PHP 中使用 jqgrid 上傳文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)
                    <legend id='QFzSH'><style id='QFzSH'><dir id='QFzSH'><q id='QFzSH'></q></dir></style></legend>

                    <i id='QFzSH'><tr id='QFzSH'><dt id='QFzSH'><q id='QFzSH'><span id='QFzSH'><b id='QFzSH'><form id='QFzSH'><ins id='QFzSH'></ins><ul id='QFzSH'></ul><sub id='QFzSH'></sub></form><legend id='QFzSH'></legend><bdo id='QFzSH'><pre id='QFzSH'><center id='QFzSH'></center></pre></bdo></b><th id='QFzSH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='QFzSH'><tfoot id='QFzSH'></tfoot><dl id='QFzSH'><fieldset id='QFzSH'></fieldset></dl></div>
                      <tbody id='QFzSH'></tbody>

                  1. <small id='QFzSH'></small><noframes id='QFzSH'>

                        <tfoot id='QFzSH'></tfoot>
                          <bdo id='QFzSH'></bdo><ul id='QFzSH'></ul>
                          • 主站蜘蛛池模板: 精品国产免费一区二区三区演员表 | 精品免费视频一区二区 | 黄色毛片黄色毛片 | 免费99精品国产自在在线 | 日韩欧美一区二区在线播放 | 国产黄色网址在线观看 | 午夜视频免费 | 欧美成人精品 | 三级视频网站 | 欧美一区二区在线观看 | 久久久久久蜜桃一区二区 | 国产成人亚洲精品 | 老头搡老女人毛片视频在线看 | 中文字幕欧美一区二区 | 亚洲一区二区三区四区视频 | 日韩中文字幕在线视频 | 亚洲精品欧美一区二区三区 | 久久久女女女女999久久 | 欧美日韩一区二区三区四区 | 亚洲精品在线视频 | 在线中文视频 | 免费观看的av毛片的网站 | 国产精品免费一区二区三区四区 | 国产成人精品一区二区三区视频 | av电影一区 | 欧美日韩午夜精品 | 国产乱码精品一区二三赶尸艳谈 | 日韩成人一区 | 日韩看片| 中文字幕一区二区在线观看 | 亚洲国产成人精品久久 | 亚洲欧美日韩电影 | 国产精品视频免费观看 | 国产精品毛片一区二区在线看 | 亚洲www.| 在线一区| 国产精品视频一区二区三 | 亚洲永久 | 天天射影院 | 久久国产精品视频 | 国产剧情一区 |