TypeError: Value does not implement interface HTMLInputElement jquery
Usually this error occurs when a jquery object sent through ajax request
Look out this scenario:
HTML
<form>
<textarea id='ans' name='ans'></textarea>
</form>
JAVA SCRIPT
var qvar={ answer: ans };
$.ajax({
type : 'POST',
url : "ajax-handler.php",
cache : false,
data : qvar,
dataType : "json",
success : function(jresult){ },
error : function(XMLHttpRequest, textStatus, errorThrown) { }
});
In the above code jquery constructs html input element textarea "ans" as an object, when you simply send the "ans" in ajax request it generates "TypeError: Value does not implement interface HTMLInputElement" error.
Comments (0)