Submit form using jquery/javascript without refreshing the page

Hi,

I am trying to do rpachallenge.com task using js in uipth. The page getting refresh when I am submitting form using jQuery, so couldn’t proceed to next round. Is there any way to submit form without refreshing the page?

Below is the code.
function my_function(e, input_name)
{
var head = document.getElementsByTagName(“head”)[0];
var script = document.createElement(“script”);
script.src = “//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”;
script.onload = function() {
$( “#randomForm” ).submit();
};
head.appendChild(script);
}

Hi

Did you manage to find a solution?

Thank you