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

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

  1. <tfoot id='ccx37'></tfoot>

      <bdo id='ccx37'></bdo><ul id='ccx37'></ul>
    <legend id='ccx37'><style id='ccx37'><dir id='ccx37'><q id='ccx37'></q></dir></style></legend>

      <i id='ccx37'><tr id='ccx37'><dt id='ccx37'><q id='ccx37'><span id='ccx37'><b id='ccx37'><form id='ccx37'><ins id='ccx37'></ins><ul id='ccx37'></ul><sub id='ccx37'></sub></form><legend id='ccx37'></legend><bdo id='ccx37'><pre id='ccx37'><center id='ccx37'></center></pre></bdo></b><th id='ccx37'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ccx37'><tfoot id='ccx37'></tfoot><dl id='ccx37'><fieldset id='ccx37'></fieldset></dl></div>
    1. Ajax - 500 內部服務器錯誤

      Ajax - 500 Internal Server Error(Ajax - 500 內部服務器錯誤)
        <tbody id='28huw'></tbody>
    2. <legend id='28huw'><style id='28huw'><dir id='28huw'><q id='28huw'></q></dir></style></legend>
      <i id='28huw'><tr id='28huw'><dt id='28huw'><q id='28huw'><span id='28huw'><b id='28huw'><form id='28huw'><ins id='28huw'></ins><ul id='28huw'></ul><sub id='28huw'></sub></form><legend id='28huw'></legend><bdo id='28huw'><pre id='28huw'><center id='28huw'></center></pre></bdo></b><th id='28huw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='28huw'><tfoot id='28huw'></tfoot><dl id='28huw'><fieldset id='28huw'></fieldset></dl></div>

      <small id='28huw'></small><noframes id='28huw'>

      <tfoot id='28huw'></tfoot>

            • <bdo id='28huw'></bdo><ul id='28huw'></ul>
                本文介紹了Ajax - 500 內部服務器錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在努力為這個項目學習 AJAX.我有一個網站加載患者正在服用的藥物.

                I am trying to learn AJAX for this project at work. I have a site that loads medications that a patient is taking.

                我遞歸地調用這個 AJAX 函數,以便它會附加一個新表,其中包含一種藥物和 7 天的歷史記錄.我在讓代碼在 FF 和 IE 中執行時遇到問題.在鍍鉻中工作得很好.我有顯示 xmlhttp.status 的警報,這就是我得到的:

                I call this AJAX function up recursively so that it will append a new table containing a single medication and 7 days worth of history. I am having issues getting the code to execute in FF and IE. Works perfectly fine in chrome. I had alerts displaying the xmlhttp.status and this is what I got:

                xmlhttp.status==500(內部服務器錯誤).

                xmlhttp.status==500 (internal server error).

                我注釋掉了我所有的遞歸,所以它被縮小到這個小代碼.(x 跟蹤藥物的數量,所以我知道什么時候停止)

                I commented out all of my recursion so it is narrowed down to this tid bit of code. ( x keeps track of the number of meds so i know when to stop)

                function LoadMeds()
                
                
                  if ( x == MaxMedCount )
                  {
                      document.getElementById("the_day").value = parseInt(document.getElementById("the_day").value)+7; 
                  }
                  if ( x == (MaxMedCount - 1) )
                  {
                      document.getElementById("x").value = x + 1;
                      show();
                  }
                  else
                  { 
                
                      if (window.XMLHttpRequest)
                      {// code for IE7+, Firefox, Chrome, Opera, Safari
                          xmlhttp=new XMLHttpRequest();
                      }
                      else
                      {// code for IE6, IE5
                          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                      }
                      xmlhttp.onreadystatechange=function()
                      {
                          try 
                          {      
                              if (xmlhttp.readyState==4 && xmlhttp.status==200)
                              {     
                                  var div = document.createElement('div');
                                  div.innerHTML= xmlhttp.responseText;
                                  document.getElementById('MedTable').appendChild(div);
                                  document.getElementById("the_med_").value = the_med_;
                
                              }
                
                          }
                          catch(e)
                          {
                              alert("Error");  
                          }
                      }
                      xmlhttp.open("GET","URL with variables passed",true);
                      xmlhttp.send();     
                      document.getElementById("x").value = x + 1;
                  } 
                

                如果需要更多代碼,請告訴我.

                if more code is needed just let me know.

                推薦答案

                500 (internal server error) 表示服務器端出現問題.這可能是幾件事,但我會首先驗證 URL 和參數是否正確.另外,請確保處理請求的任何東西都期望請求是 GET 而不是 POST.

                The 500 (internal server error) means something went wrong on the server's side. It could be several things, but I would start by verifying that the URL and parameters are correct. Also, make sure that whatever handles the request is expecting the request as a GET and not a POST.

                了解更多信息的一種有用方法是使用 Fiddler 之類的工具讓您查看所有 HTTP 請求和響應,以便準確查看您發送的內容以及服務器的響應.

                One useful way to learn more about what's going on is to use a tool like Fiddler which will let you watch all HTTP requests and responses so you can see exactly what you're sending and the server is responding with.

                如果您沒有令人信服的理由來編寫自己的 Ajax 代碼,那么最好使用一個為您處理 Ajax 交互的庫.jQuery 是一種選擇.

                If you don't have a compelling reason to write your own Ajax code, you would be far better off using a library that handles the Ajax interactions for you. jQuery is one option.

                這篇關于Ajax - 500 內部服務器錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

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

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

                    • <bdo id='G2Ld9'></bdo><ul id='G2Ld9'></ul>
                        • 主站蜘蛛池模板: 日韩中文字幕 | 欧美一区二区激情三区 | 精品国模一区二区三区欧美 | 久久丁香 | 日韩欧美综合在线视频 | 日日夜夜精品视频 | 中文字幕免费视频 | 亚洲欧美视频 | 国产农村妇女毛片精品久久麻豆 | 精品乱码一区二区三四区 | 精品在线看 | 日本不卡一区二区 | 国产综合在线视频 | 国产高清久久久 | 国产不卡一区在线观看 | 99精品国产一区二区青青牛奶 | 999视频| 国产露脸对白88av | 国产精品毛片在线 | m豆传媒在线链接观看 | 国产一区二区三区在线 | 日韩精品一区二区三区视频播放 | 在线看片国产 | 国产精品不卡 | 亚洲国产精品久久久久 | 56pao在线 | 精品无码久久久久久国产 | 亚洲97 | 日本亚洲一区 | 国产午夜精品视频 | 日韩在线不卡视频 | 黑人精品欧美一区二区蜜桃 | 一级黄色片免费 | 精品免费视频 | 亚洲人成网站777色婷婷 | 免费观看av网站 | 国产精品一区一区 | 天天澡天天操 | 精品国产色 | 国产片侵犯亲女视频播放 | 一区二区三区视频在线免费观看 |