[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Novelty forum • View topic - How do I disable a button after it is clicked?
Page 1 of 1

How do I disable a button after it is clicked?

PostPosted: Tue Aug 13, 2013 9:24 pm
by Axido
Yeah, the question is quite self-explanatory.

This is my situation:
I have a starting screen and a "New Game" button on it. When I click it, it will play a thread to fade out the background before jumping to the next page. In that thread I included a command to also hide the button, but when I tried to click the hidden button, it of course worked. It's just invisible, not disabled. I never found an action to disable the button nor do I know a command to disable it by using a script. Is there any or why else should a button have states like "enabled" or "disabled" if you can't switch between them? Or am I just too blind to find an action for that?

Re: How do I disable a button after it is clicked?

PostPosted: Wed Aug 14, 2013 1:32 pm
by 8oni

Re: How do I disable a button after it is clicked?

PostPosted: Fri Aug 16, 2013 4:14 pm
by Axido
Thanks for the script.
Does it work the other way around? I encountered a problem when enabling a disabled button. My buttons don't show up until I cross them with the mouse. Did that ever happen to you?

Edit:
Fixed it. I don't exactly know why, but it seems like in any case the "disabled state" image was the reason. I didn't have one. Now I use the exact same image as in the enabled state and it works fine.^^