Copy link to clipboard
Copied
I integrated in a pdf
- two radio buttons which have also their own Javascript
- a new textfield (txt_field)
After clicking
- option 1 the textfield should be updated via Javascript of radio button 1:
txt_field="€";
(2) option 2 the textfield should be updated via Javascript of radio button 2:
txt_field="$;
Result: Nothing happened in the moment
How can I implement this feature?
Thanks for further information!
JuMa
This JavaScript alone can do nothing. Is there more? What does it say in the console?
Copy link to clipboard
Copied
This JavaScript alone can do nothing. Is there more? What does it say in the console?
Copy link to clipboard
Copied
Hi MVP and others,
,
I tried following lines (as js for a radio button)
app.alert ("Start javascript"); //has been shown
txt_EINHEIT.value="€"; //is not working
app.alert ("Ende javascript"); //has been shown
Who kows that problem?
Regards
JuMa
Copy link to clipboard
Copied
That's not how you access a field. Use the getField method.
Copy link to clipboard
Copied
Hello try67,
I use your information in 9 hours. Thanks.
Regards
JuMa
Copy link to clipboard
Copied
Hi. Could you explain more about the getField method?
In the Radio Button Properties box, I went to Actions. I don't know the best trigger to select: Mouse Enter or Mouse Exit, maybe? The action I selected is "Run a JavaScript."
I'm familiar with JavaScripts that link dropdown lists with text fields. I don't know how to link radio buttons to text fields.
When I link a dropdown list to a text field, I use:
switch (event.value) {
case "A":
this.getField("Text Field").setItems(["A1","A2","A3"]);
break;
case "B":
this.getField("Text Field").setItems(["B1","B2","B3"]);
break;
}
How do I adjust this JavaScript to work with a radio button instead of a dropdown list? Where do I put it in the Properties box? What trigger should I select?
Thanks for your help.