Reputation: 225
When I send this request using jquery:
<form id="myForm" action="http://myIp/../cat/create" method="post">
<fieldset>
<legend>jQuery.post Form Submit</legend>
Cat Id : <INPUT type="text" name="catId">
Cat Name: <INPUT type="text" name="catName">
<input type="submit" value="Submit" />
</fieldset>
</form>
The script:
$(document).ready(function() {
$('#myForm').ajaxForm(function() {
alert("Thank you for your comment!");
});
});
The JAX-RS(REST) cannot identify the correct method to call and print the following message: INFO: The system cannot find any method in the "My Class" class that supports OPTIONS. Verify that a method exists.
Hence when I do the same without using jquery but with just plain HTML everything is fine:
<FORM action="http://myaddress/../car/create" method="post">
<P>
Car Id : <INPUT type="text" name="carId">
Car Name: <INPUT type="text" name="carName"><
<INPUT type="submit" value="Send">
</P>
</FORM>
Can anybody tell me what I'm doing wrong with jquery?
Upvotes: 0
Views: 713