I am using Gradient Buttons as a menu across the top of our web page. When the page that is associated with a button is displayed I want the button to be 'Black Marble' otherwise I want the button to be 'Bright Gold'. I have defined a field and bound it to the 'button style' property for each button and was setting this in the RPGLE program to the desired value.
I was trying to set the button style property in the .onClick event for each button to 'Black Marble' but this does not change the style of the button.
Here's how the buttons look when the initial page is displayed:
Here is how the Customers button is defined:
Here is the javascript code in the Customers button .onClick event:
applyProperty("btn_Customers", "button style", "Black Marble");
Does anyone see why the above javascript does not change the 'Customers' button to 'Black Marble"?
Changing Button Style onClick
-
- Profound User
- Posts: 22
- Joined: Fri Aug 06, 2010 1:40 pm
- First Name: Rich
- Last Name: Dotson
- Company Name: Wheeling & Lake Erie Rail
- State / Province: Ohio
- Country: United States
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Changing Button Style onClick
Some properties are only checked when the field type of the widget is set. After your call to set the button style, try including this line, also:
That should force it to reset the button style.
Code: Select all
applyProperty("btn_Customers", "field type", "styled button");
Who is online
Users browsing this forum: gmikos and 2 guests