Hello, I am trying to implement the following feature: There are the edit text and push button text in the dialog. I want to have the button disabled if the text field is empty but once end-users starts entering the text, enable the button. if the text is edited and becomes empty, disable the button again. The code I use is: * The custom action to check the text: <CustomAction Id="CheckSerialVbs" Script="vbscript" Execute="immediate" > <![CDATA[ On Error Resume Next Dim serial serial = Session.Property("SERIALNUMBER") If serial.Len=0 Then Session.Property("SERIALVALID")="0" Else Session.Property("SERIALVALID")="1" End If ]]> </CustomAction> * The edit control: <Control Id="SerialEdit" Type="Edit" X="15" Y="150" Width="220" Height="16" Property="SERIALNUMBER" Text="{20}"> <Publish Event="DoAction" Value="CheckSerialVbs">1</Publish> </Control> * The button: <Control Id="Next" Type="PushButton" X="220" Y="250" Width="56" Height="17" Text="Next"> <Condition Action="disable"><![CDATA[SERIALVALID<>"1"]]></Condition> <Condition Action="enable">SERIALVALID="1"</Condition> </Control>
However, this doesn't work - the button state is changed, but only if I leave the SerialEdit field. If I insert line MsgBox "CheckSerial call" in the custom action script then it shows the message box every time when I type something in SerialEdit field, leave the field or focus it. This proves that custom action is executed properly according to my needs. However, the button state isn't changed properly. Can anyone help me and point to my mistake with the described approach? Thanks in advance... -- View this message in context: http://n2.nabble.com/Edit-text-and-button-state.-tp1108917p1108917.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users