Hi,
Buttons don't hold values--you can't assign a value to a button.
You normally place a script on it's click event, some solutions for you would be
- to have either a hidden field or a formVariable) store whether a click has happened.
- change an attribute of the button (like the fillColor) when clicked and then have other scripts look for that. A button click event changing fillColor does not cause calculate events to fire, so if you want some script on the calculation event to run in response to a fillColor change, put an
TextField1.execCalculate(); at the end of the script.
Here's an example:
///////////////////////////////////////////////////////////////////////////////
form1.#subform[0].Button1::click - (FormCalc, client)
$.fillColor = "255,255,255" //button click changes its own fillColor
TextField1.execCalculate() //then fires the script below
/////////////////////////////////////////////////////////////////////////////
form1.#subform[0].TextField1::calculate - (FormCalc, client)
if(Button1.fillColor == "255,255,255")then //checks button fillColor
$ = "yes" //does something
else
$ = "no" //or does something
endif
/////////////////////////////////////////////////////////////////////////////
Hope this helps!
Stephen