Hide button for few seconds

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Hide button for few seconds

Post by bondicoffee »

Hi,

I am in process of adding a button[operation] on a query to execute a process. Is there any way I can disable the button for a few seconds per record and enable the button once the process is completed?

Thanks!
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Hide button for few seconds

Post by hpl123 »

Yes, can be done with some basic JS using setTimeout methods: https://www.w3schools.com/jsreF/met_win_settimeout.asp . You basically have a special class added to the button and then when the form or VP or whatever it is that contains the button loads, a JS function loads which after x amounts of seconds changes class or changes styles in the class. You can also do a bit more complex JS where the JS function waits for some other action but is again a bit more complex. I have done various things like this (both simple and complex scenario) in the past and works.
Henrik (V8 Developer Ed. - Windows)
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: Hide button for few seconds

Post by bondicoffee »

Hi,

Thanks for your advice. I will try this.


Cheers!
Post Reply