<style type=”text/css”>
.rj_form{
position:relative;
}
.rj_form_preloader{
display:none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255,255,255,0.7);
text-align: center;
vertical-align: middle;
}
.rj_form_preloader span{

position: absolute;
top: 50%;
transform: translateY(-50%);
}
.rj_form[data-form-status=”submiting”]{

}
.rj_form[data-form-status=”submiting”] .rj_form_preloader{

display:block;
}
.rj_form[data-form-status=”submitted”] .rj_form_preloader{
display:none;
}
</style>
<script type=”text/javascript”>
var form = document.querySelector(‘.exam_questions_form’);
form.addEventListener(‘submit’,function(ev){
ev.preventDefault();
form.setAttribute(‘data-form-status’,’submiting’);
var formData = new FormData(form);

var r = new XMLHttpRequest();
r.open(“POST”, “<?php echo admin_url(‘admin-ajax.php’); ?>”, true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;

form.setAttribute(‘data-form-status’,’submitted’);
console.log(r.responseText);
};
r.send(formData);
return false;
});

</script>

Add above code in your index.php file

<?php
add_action( ‘wp_ajax_get_course_result’, ‘my_action_callback’ );
add_action( ‘wp_ajax_nopriv_get_course_result’, ‘my_action_callback’ );
function my_action_callback(){
echo 1;
die(0);
}

Add above code in your functions.php file.