what is the purpose of having if(isLoading || newValue == ''){return} in on change client script??

Manikantahere
Tera Contributor

I know if we want to write onload script in on change that we can write here but what was the purpose of this function mentioned here in every on change client script.

6 REPLIES 6

Thanks for info Vaibhav!!

 

for suppose if I don't have function to check is loading what is going to happen is our script written for on change going to execute for on load too?? 

if not what is the purpose of having this here in on change script when we have on load type exclusively ?

Parth_Poriya
Tera Expert

It means if the page is loading OR the new value of the field is empty, exit the script, you can modify it to meet your needs.

and if u change the value of that field it will get replaced by new value