[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?

How do I disable a button after it is clicked?

Ask questions on content creation or share your own custom content.

How do I disable a button after it is clicked?

Postby Axido » Tue Aug 13, 2013 9:24 pm

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?
Axido
 
Posts: 6
Joined: Sun Jul 28, 2013 3:24 pm

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

Postby 8oni » Wed Aug 14, 2013 1:32 pm

So many idea, so little time
User avatar
8oni
 
Posts: 259
Joined: Tue Oct 30, 2012 12:23 pm

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

Postby Axido » Fri Aug 16, 2013 4:14 pm

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.^^
Last edited by Axido on Fri Aug 16, 2013 5:38 pm, edited 1 time in total.
Axido
 
Posts: 6
Joined: Sun Jul 28, 2013 3:24 pm


Return to Content Creation

Who is online

Users browsing this forum: No registered users and 2 guests

cron