disable/enable buttons

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
semua
 
 
Posts: 62
Joined: Fri Jan 20, 2017 2:28 am

disable/enable buttons

Post by semua » Thu Jan 11, 2018 11:16 am

Hello
How to disable / enable buttons per click? I searched for "Events" but did not find this feature.
Thank you very much in advance.

User avatar
Pablo
 
Posts: 20631
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: disable/enable buttons

Post by Pablo » Thu Jan 11, 2018 11:23 am

You will need to use a JavaScript function to disable a button.
For example:

Code: Select all

document.getElementById('Button1').disabled = true; 

semua
 
 
Posts: 62
Joined: Fri Jan 20, 2017 2:28 am

Re: disable/enable buttons

Post by semua » Thu Jan 11, 2018 11:28 am

Ah, it worked, thanks! I just thought the color would change to gray when it was disabled. Is it possible to change the color?

User avatar
Pablo
 
Posts: 20631
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: disable/enable buttons

Post by Pablo » Thu Jan 11, 2018 12:08 pm

This also requires Java Script.
https://www.w3schools.com/jsref/prop_style_color.asp

Note that this is not specific to WWB.

semua
 
 
Posts: 62
Joined: Fri Jan 20, 2017 2:28 am

Re: disable/enable buttons

Post by semua » Thu Jan 11, 2018 4:05 pm

Hello

Unfortunately it does not work. When adding the javaScript event document.getElementById (""). Style.color = ""; the button does not work, no event.

User avatar
Pablo
 
Posts: 20631
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: disable/enable buttons

Post by Pablo » Thu Jan 11, 2018 4:15 pm

Then there is probably an error in your code.

Please note that I cannot provide support on custom code.
With my reply, I just wanted to point you in the right direction.

semua
 
 
Posts: 62
Joined: Fri Jan 20, 2017 2:28 am

Re: disable/enable buttons

Post by semua » Thu Jan 11, 2018 4:31 pm

Right. I got it, thanks!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 10 guests