Note that there are some explanatory texts on larger screens.

plurals
  1. POPut method not working in Google Chrome through AJAX
    primarykey
    data
    text
    <p>I have this working fine in Mozilla and IE but for some reason not chrome. In chrome, the error callback executes every time returning an error code of zero. Lots of articles on Stackoverflow keep reiterating how all major browsers support the "PUT" method through AJAX instead of forms. Chrome appears to be the exception.....</p> <p><strong>JavaScript</strong></p> <pre><code> function works(){alert("working");} // just a success callback $(document).ready(function(){ $("#crudForm").submit(function(){ $.ajax({url:"/UtilityDashboard/MeasurementNodes", data:parseFormData("crudForm"), cache: "false", async: "false", dataType: "text", contentType: "application/x-www-form-urlencoded", type:"put", success: works(), error:function(xhr){alert(xhr.status + xhr.statusText);} }); }); }); </code></pre> <p><strong>HTML</strong></p> <pre><code> &lt;form id="crudForm"&gt; Name&lt;BR/&gt; &lt;input type="text" name="name"/&gt;&lt;BR/&gt;&lt;BR/&gt; Node Id&lt;BR/&gt; &lt;input type="text" name="node_id"/&gt;&lt;BR/&gt;&lt;BR/&gt; Type&lt;BR/&gt; &lt;input type="text" name="type"/&gt;&lt;BR/&gt;&lt;BR/&gt; Parent&lt;BR/&gt; &lt;input type="text" name="parent_id"/&gt;&lt;BR/&gt;&lt;BR/&gt; Longitude&lt;BR/&gt; &lt;input type="text" name="longitude"/&gt;&lt;BR/&gt;&lt;BR/&gt; Latitude&lt;BR/&gt; &lt;input type="text" name="latitude"/&gt;&lt;BR/&gt;&lt;BR/&gt; Description&lt;BR/&gt; &lt;textarea name="description" rows="5" cols="40"&gt;Insert description of measurement node here&lt;/textarea&gt;&lt;BR/&gt;&lt;BR/&gt; &lt;input type="submit" value="Add Node"/&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload