Frappe Cloud Support Partners Foundation Frappe School

Auto-Close Alert Box

I have written some custom code and that is doing some calculation.
Actually what happens when I select some value from a Select Box, based upon that value it does some calculation and after that it add some rows into a table, but the entire process takes some time. What I want is to show a alert/message box like Please wait… and also I want that the message/alert box should automatically disappear once the process is complete.

Any idea, how can we achieve this?

Ruchin Sharma

@ruchin78 you can use dialog box inside setTimeout

Any idea how to do that, I really do not have any idea about this.
I really appreciate, if you may help me on that.

Ruchin Sharma

If you are using ajax call then you can use freeze: true,

	method: "",
	args: {},
	freeze: true,
	freeze_message: "Please wait ..",
	callback: function(r) {
1 Like

I really don’t know about ajax call but yes, I do call server side functions like this.

Ruchin Sharma

If you are doing with frappe call then use above syntax. It freezes screen with freeze_message until the operation is completed.

Let me hands-on it.

Ruchin Sharma

Is it possible to write a custom script client-side that automatically closes pop-up alert/dialog boxes in ERPNext?