Good afternoon,
Prior to Forms 10.2.1 we were using the code as below, but with the line var frm = $("#form1") activated and the other one below it did not exist.
When we migrated to 10.2.1 it now would fail if we used #form1, so in doing trail and error I found out that doing "document" works, but wanted to check with you if you know why this would happen.
In viewing the source code we found that there there is no "form" tag or "#form1" id, so I decided to give "document" a try, which worked for the little snippet below.
Anyone having to do similar updates in order to make an ajax call snippet work. If you have any links to documentation I'd appreciate if you could share it, so that I can take a closer look at what I should be using.
If we use "#form1" I get the error: error on submit An unexpected error has occurred. [LFF502-UnexpectedError]
$(document).ready(function() { FormSubmit(); }); function FormSubmit() { //var frm = $("#form1"); // no longer works var frm = $(document); // this is new and works for the little test $.ajax({ url: frm.attr("action"), data: frm.serialize(), type: "post", success: function (data) { var obj = jQuery.parseJSON( '{ "name": "test" }' ); var r = (obj.name === "test" ); alert('success on submit ' + r); }, error: function (data) { var r = jQuery.parseJSON(data.responseText); alert('error on submit ' + r.message); } }); }