javascript - $(...).serializeJSON is not a function -
i have no idea why getting error despite include jquery library. code:
function create() { var employeeform = $("#createuser").serializejson(); var employee = json.stringify(employeeform); $.ajax({ url: uric, type: 'post', data: employee, success: function(results) { } });
the library:
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-2.0.3.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
what missing???
create new js script in project , paste script there : https://raw.githubusercontent.com/marioizquierdo/jquery.serializejson/master/jquery.serializejson.js. add script src page.
Comments
Post a Comment