TypeError: Value does not implement interface HTMLInputElement

ajax, jquery, php

Solution

This error can be generated if you send a jQuery object in an ajax request. So in your situation, it's likely that one of `c_id`, `c_name`, or `c_description` is a jQuery object representing an input field rather than the `.val()` value of the input element.

Problem

I'am trying to post a form using jQuery-ajax, and I'am getting this error on posting the form on click. `TypeError: Value does not implement interface HTMLInputElement` here is my JavaScript code: ``` $('document').ready(function () { $('#update').click(function () { jQuery.post("update_category", { c_id: c_id, c_name: c_name, c_description: c_description }, function (data, textStatus) { if (data == 1) { $('#response').html("Thank You!!..We Will Get Back To You Soon..!!"); $('#response').css('color', 'green'); } else { $('#response').html("Some Error Occurred"); $('#response').css('color', 'red'); } }); }); }); ``` my form : ``` <div id="form"> <form> <!-- PRONT DROP DOWN HERE !--> <input type="text" name="c_id" id="c_id" disabled="disble" placeholder="'.strtoupper($r['c_id']).'" value="'.strtoupper($r['c_id']).'" ></input> <input type="text" name="c_name" id="c_name" disabled="disble" placeholder="'.strtoupper($r['c_name']).'" value="'.strtoupper($r['c_name']).'"></input> <textarea rows="4" class="field span10" name="c_description" id="c_description" disabled="disble" placeholder="Description">'.strtoupper($r['c_description']).'</textarea> </form> </div> ```

Original source

Related problems