php - TypeError: Value does not implement interface HTMLInputElement -
i'am trying post form using jquery-ajax, , i'am getting error on posting form on click. typeerror: value not implement interface htmlinputelement
here 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 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>
this error can generated if send jquery object in ajax request. in situation, it's 1 of c_id
, c_name
, or c_description
jquery object representing input field rather .val()
value of input element.
Comments
Post a Comment