there is a js in web_form.html which is
frappe.call({
type: “POST”,
method: “frappe.website.doctype.web_form.web_form.accept”,
args: {
data: data,
web_form: frappe.web_form_name,
for_payment: for_payment
},
freeze: true,
btn: $form.find(“[type=‘submit’]”),
callback: function(data) {
//alert(window.location.pathname );
if(!data.exc) {
frappe.doc_name = data.message;
if(!frappe.login_required) {
$form.addClass(“hide”);
$(“.comments, .introduction, .page-head”).addClass(“hide”);
scroll(0, 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//click2close(“Successfully Registered!!!”,“info”);
//messenger(“Thank you for Registering”,“Success”);
//window.location.href = “/home_page”;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$(“#catalogue”).hide();
set_message(frappe.success_link, true);
}
else {
set_message(__(‘Submitted’));
}
$(‘div.form-message p:nth-child(1)’).append( " Please Note that your application id is “+frappe.doc_name +” " );
if(frappe.is_new && frappe.login_required) { // reload page (with ID) window.location.href = window.location.pathname + "?name=" + frappe.doc_name; } if(for_payment && data.message) { // redirect to payment window.location.href = data.message; } } else { frappe.msgprint(__('There were errors. Please report this.')); } }, always: function() { window.saving = false; } }); return true;
}
in this js i can see a section
freeze: true,
and i created a webform which has child table in it when i submit this webform it freezes the screen until form submitess successfully but i want to use spinner instead of freeze and i have done this
HTML SIDE OF SPINNER
<div class="container" id="spinner" style="display:none;">
</div> <div class="animationload"> <div class="osahanloading"></div> </div>
and
js side is
$(‘#spinner’).show();
frappe.call({
method: “erpnext.schools.doctype.corporate_registration.corporate_registration.create_lead”,
args: {
“sender”: email,
“name”: name,
“company_name”: organization
},
callback: function(r) {
if(r.message) {
console.log(“ok”);
$(‘#spinner’).hide();
}
}
});
but spinner hides and screen is still freezed
so i would like to know is there any way to know is the screen is freezed or not