These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

changing a value in a textbox that is a simplified field notation

kajirus3
Registered: May 18 2008
Posts: 16

I can't seem to get the value in a simplified field notation to change when my

radio button is checked. The button is named btnMiles and the text box is

txtRate. When the radio button is checked I need the value in the sfn to change

and if it is unchecked to go back to normal.

Anyone have any ideas on this? something so simple can drive you nuts!!!! lol

thanks in advance. javascript is great but at times so hard to see somethings

My Product Information:
Acrobat Pro 8.1.2, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You probably do need to use JavaScript. For example, in the Mouse Up event of the check box you can use the following JavaScript:

// Define the two possible rates (just an example)
var rate1 = 5.5;
var rate2 = 7.5;

// Get a reference to the Rate field
var fRate = getField("txtRate");

if (event.target.value != "Off") {
// If this check box is unchecked, use rate1
fRate.value = rate1;
} else {
// If this check box is checked, use rate2
fRate.value = rate2;
}


George
kajirus3
Registered: May 18 2008
Posts: 16
George


Thanks for your help but it is not quite what I needed.

How do you access the simplified notation field.

To change the value there. That is what I needed it to do.

Can you help ?


Thanks
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
> How do you access the simplified notation field.I do not understand this question. Can you explain in more detail what you're trying to accomplish? Are you using a radio button or a check box?

George
kajirus3
Registered: May 18 2008
Posts: 16
/George

once again thanks for the help!. In a text box under properties under the

calculate tab. The second choice is simplifed notation field. I use this field in a

calculatation. When the radio button is chosen it will change the simplified

notation amount to a different number to do the same calculation but with a

different number for the rate. Thanks again for the help I hope this clairfies

things.


thanks
scottsheck
Registered: May 3 2007
Posts: 138
Kajirus3,

It sounds like you are using Acrobat to do your scripts and not Livecycle Designer, and that you want to use the Simplified Notation script (which is really just Formcalc script code), which means you should probably post your question in the ACROBAT forum since the script you wish to find is not Javascript code. George was giving the solution in Javascript code since this is the Javascript forum. Hope that maybe helps. sorry to interfere.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Because you have to use the "if" statment you can not use the simplified field notation option. This option is for very simple names only 3 basic arithmatic operations, division can not used because of the possability of division by zero, and one can not access any properties, methods or functions.

You will have to use the "Custom Calculation script" option.

George Kaiser