The following script is assigned to a Checkbox - but when I deselect the Checkbox, the mandatory property does not activate again - the field presence for the TradePrice field does (invisible when checked, visible when unchecked), but not the mandatory action. It disables just fine, but I can't get it to re-enable, so to speak, if the user checks the box, but then later un-checks it. Is the term "enabled" wrong? Or am I not even close here.... :)
form1.Subform2.NoTrade::mouseUp - (JavaScript, client)
if (NoTrade.rawValue == 1)
{TIVID.mandatory = "disabled"
TIVIN.mandatory = "disabled"
TIMake.mandatory = "disabled"
TIModel.mandatory = "disabled"
TIModelYr.mandatory = "disabled"
TIMileage.mandatory = "disabled"
TIBalance.mandatory = "disabled"
TradePrice.mandatory = "disabled"
TradePrice.presence = "invisible"
}
else
{TIVID.mandatory = "enabled"
TIVIN.mandatory = "enabled"
TIMake.mandatory = "enabled"
TIModel.mandatory = "enabled"
TIModelYr.mandatory = "enabled"
TIMileage.mandatory = "enabled"
TIBalance.mandatory = "enabled"
TradePrice.mandatory = "enabled"
TradePrice.presence = "visible"
}
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script