One pair of radio buttons to control multiple text objects - Designer 8.0
Greetings - a big thank you in advance for any assistance. I have often found answers to my problems on this forum, but have been unable to find an answer to the following.
The short of it - is it possible to make a pair of radio buttons control the visibility of multiple text objects with the same name(I have had success in manipulating only a single text object with one pair of buttons)?
The long of it - I am trying to make a form bilingual based on the value of a radio button group to control the visibility of the text object in the selected language. When the user selects the language they wish to see, all the text objects in the form switch to that language. I am working with a dynamic PDF.
I have succeeded to a very limited extent in manipulating one text object by overlaying text objects in both languages, setting one object to "invisible" as default, and controlling that text objects visibility with the following JavaScript in the click event of the radio button group:
----- form1.#subform[0].ENG_JPN::click: - (JavaScript, client) -------------------------------------
if (ENG_JPN.rawValue == 1)///1 equals the value of on
{English.presence = "visible";}
else
{English.presence = "invisible";}
if (ENG_JPN.rawValue == 2)///2 equals the value of on
{Japanese.presence = "visible";}
else
{Japanese.presence = "invisible";}
endif
The problem is I need to manipulate the visibility of all text objects with the same name on the form with a single radio button group. I have tried writing the code as one does for the sum of a repeating field, ie. English[*].presence etc. however I get a C++ error in preview.
Any ideas are greatly appreciated. I am truly stumped - thank you for your time.
To access objects with the same name you need to deal with occurance numbers. If your object is called TextField then the 1st occurance will be TextField[0], the second occurance will be TextField[1] etc.....
The issue is that the [] in javascript are interpretted as an array element so you have to use the syntax: xfa.reolveNode("string") to get to your object names. In your case you would use:
xfa.resolveNode("TextField[1]").presence = "visible"
This string syntax allows you to use a var to hold the index number and is very useful with for loops where you want to set large numbers of objects. So if the index was held in the var i then your syntax would be:
xfa.resolveNode("TextField[" + i + "]").presence = "visible"
If the objects are in a repeating subform then the occurance numbers are on the subform and not the object. You can always get the expression to use by app.alert(objectname.somExpression). This will return the expression that you need to create.
Make sense?
Similar Messages
-
Using radio buttons to populate a text field
Hi
This is my first time creating Adobe Forms and my first time using JavaScript as well. One of the questions on my form asks about Ethnicity and I have about 15 choices for which I created radio buttons. I want the user's choice to populate a textfield, but am not sure how to write the code that will do this. Any help would be greatly appreciated. ThanksIf you set the export value (aka Button Value, Radio Button Choice) of each radio button to the text you want to show up in the text box, the custom calculate script for the text box, which you should set to read-only, can be simply:
(function () {
// Get the value of the radio button group, as a string
var s = getField("Ethnicity").valueAsString;
// Set this field's value to the text associated with the selected radio button
event.value = s === "Off" ? "" : s;
If none of the radio buttons is selected, the text field will be blank. Change "Ethnicity" above to the actial name of the radio button group. -
Using radio button selection in multiple tables
Hello All,
I've got a bit of a design issue and it being a Friday my brain is a bit foggy and I can't seem to figure out a solution.
what I want to do is have 3 tables. The user should only be able to select one line from any of the three tables.
I can do this by having events that clear down selection on the two other tables on any selection of the third, but the select buttons of tables don't really give the UI impression that only one row can be selected. To do this I'd like to use the radio button element.
so
table A
choice - name
(o) - Anne
(o) - Bob
(o) - Charlie
Table B
choice - name
(x) - David
(o) - Ellen
(o) - Fran
Table C
choice - name
(o) - George
Here the entry in table B for David is selected. But any selection of any of the other options should deselected.
My thoughts are to use a radio button ui element, bind the "selected" value to a unique id for each row/table (an attribute of the node element for each table) and the value to a common shared attribute (not table specific).
Any better ideas - and certainly any which would mean I'm not going to have to maintain a lookup table of my unique ids and node elements to find out which one is selected?
Cheers,
ChrisOk - here's how I did it.
I created another lookup table which had a guid and reference to the element.
in the each elements I had a guid which I bound to the key for selection property of the radio button in the table.
I then bound the selected key property to an attribute that was common to all elements.
in my "processing" logic I read the selected key, read the lookup table - and therefore got the reference to the selected element.
Would have been an awful lot easier if I could have used a reference to the element itself as the "key" - but that was required to be a character field.
[image showing radio button selection working across multiple tables|http://i51.tinypic.com/bi79dx.jpg]
End result works quite nicely.
Cheers,
Chris -
Using a Radio Button to Disable Multiple Checkboxes
Hi everyone,
My name is Christian and I am trying to design a form using Adobe Designer 7 that when a user selects a group of two radio buttons (one marked Macintosh and one marked Windows) it automatically disables 3 or 4 checkboxes of various software applications further down the page.
The idea is if you select the Windows radio button, you would not be able to select the iWorks or StuffIT checkboxes (as that is Mac software), but conversely if you check Macintosh radio button the iWorks and StuffIT checkboxes activate but the Office 2003 and Microsoft Money checkboxes deactivate (because that is Windows software).
Im not really a developer so any assistance would be appreciated. Thanks for reading and have a great day! :-)
ChristianI suspect that you have a problem in some portion of your code that you have not posted. To help debugging I suggest you create a simple test using two pages: input.cfm and action.cfm. Get the most simple case working then add the javascript, css, and CF code to make your application work.
<!--- contents of input.cfm --->
<html>
<head>
<title>Input</title>
</head>
<body>
<form action="action.cfm" method="POST">
Choose type: <br />
<input name="type" type="radio" value="male" /> Male<br />
<input name="type" type="radio" value="female" /> Female<br />
<input type="submit" />
</form>
</body>
</html>
<!--- content of action.cfm --->
<html>
<head>
<title>Action</title>
</head>
<body>
<cfif form.type eq "male">
Type is male.
<cfelseif form.type eq "female">
Type is female.
</cfif>
Here is a cfdump of the form variables:<br />
<cfdump var="#form#" />
</body>
</html>
Message was edited by: JR "Bob" Dobbs
Added sample for action.cfm -
Radio button in bdc multiple transaction
hi,
i m working on two dependent transactions in bdc(using call transaction method) on ie01 and ko01 transactions where in in the selction screen i used two radio buttons under one group for calling each transaction,but i m unable to call ko01 transaction when i click to ko01 radiobutton and press execute its going into ie01 transaction,can any one explain how we can write the code to call two transactions seperately and upload data seperatly for both under single radio button group in single pgm......Hi Raj,
Can you please send me the BDC code which you have written for tcode ko01. I am getting the following problem in BDC code for uploading internal orders in KO01 tcode.
I want to enable a field in BDC program for ko01 tcode.
In this tcode, based on order type the business area field is enabling and disabling. If it is enabled then we have to enter business area bcaz its a mandatory field. Business area will be disabled if system generates a value into that field based on order type.
How can do it in BDC program of this disabling and enabling technique.
I want to enable the business area irrespective of order type and i will pass the value to it,bcaz in my flat file business area value is given for all order types.
Its an urgent issue.
Thanks in Advance.
Regards,
Swapna -
Select List or Radio Buttons query with multiple tables join
Hello,
I'm having a problem creating a select list or a radio group item.
I need to display the emp_first_name in the select list but have the return value of the order_id in the select list or radio buttons item.
The tables are as follow:
emp_table
emp_id
emp_first_name
emp_last_name
etc...
orders_table
order_id
order_name
emp_id
etc...
I need to display the emp_name from emp_table in the select list but return the order_id from the orders_table as the return value.
How can I do this?
Any help would be greatly appreciated.
Thanks.
Regards,
NJHi NJ,
Try:
select e.emp_first_name d,
o.order_id r
from orders_table o
inner join emp_table e on o.emp_id = e.emp_id
order by 1You may have an issue with an emp_id being used for more than one order and, therefore, the employee's name appearing more than once in the list?
Andy -
No indication that a Radio Button reference control is Strict. Intentional or bug?
On the front panel control for a Reference of a Radio Button, when you Include Data Type, there's no indication (red asterisk).
edit: no wait, there is, but it's hidden by the graphic on the reference. You can barely see some red. Bug.
'nother edit: same for clusters, maybe more. We need to be able to see that red asterisk more clearly.
RichardI would definitely call it a bug, fortunately, it is cosmetic and does not really break anything.
The bug is present on all references that have that option (waveform, cluster, radiobutton, numerics, etc.) Even on numerics, it is still slighly covered by the graphics (second from left).
That star needs to be in the top center, similar to the graphics to distiguish strictly typed static VI references on the diagram (right).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
StarredReferences.png 2 KB -
Check box or radio button to control image opacity and text field. javascript
This is a little over head and skill set so I am reaching out to you fine people.
I am using Adobe acrobat pro x
I have radio buttons now but I can switch to check box if needed.
What I need the Java script to do is...
If Yes is checked then a text field labeled comments appears and an image labeled box changes the opacity to 100%.
If No is checked then it does the opposite. Text field disappears and image goes to 0% opacity.This is the Adobe Reader forum. You are more likely to receive a helpful answer if you ask in the appropriate Acrobat forum (e.g. Acrobat SDK).
-
Radio button to determine what text is put into the body of an email
Hi all,
I need some help with a radio button and java scripting. This is the code I'm using on a button with a mouse up event using Java script run at the client
var oSubmit = this.resolveNode("$..#submit");
var cToAddr = "[email protected]";
var cCCAddr = "[email protected]";
var cSubLine = "Security Access Authorization";
var cBodya = "Dear Help Desk," + "\n" + "\n" +
"This email serves as my electronic approval for " + "\n" + "\n"
var cBodyb = "============ SECURITY ACCESS REQUEST DETAILS ================" + "\n" + "\n"
var cBodyc = (EffDate.length = "")
if(EffDate.rawValue)
cBodyc = "Effective Date - " + EffDate.formattedValue + "\n" + "\n"
var cBodyd = (RadBut.length == "2")
if(RadBut.rawValue)
cBodyd = "Status - Create New User Account" + "\n" + "\n"
var cBodye = (RadBut.length == "3")
if(RadBut.rawValue)
cBodye = "Status - Add/Remove Access" + "\n" + "\n"
var cBodyf = (RadBut.length == "5")
if(RadBut.rawValue)
cBodyf = "Status - Terminate" + "\n" + "\n"
var cBodyg = (RadBut.length == "1")
if(RadBut.rawValue)
cBodyg = "Status - Department Transfer from " + "\n" + "\n"
var cBodyh = (RadBut.length == "4")
if(RadBut.rawValue)
cBodyh = "Request to have name changed to - " + "\n" + "\n";
oSubmit.target = "mailto:" + cToAddr + "?cc=" + cCCAddr
+ "&subject=" + cSubLine
+ "&body=" + cBodya + cBodyb + cBodyc + cBodyd + cBodye + cBodyf + cBodyg + cBodyh ;
this is the test layout I'm using
No matter what I try, it always put all of the choices in the body of the email, not just the one I checked. any help would be greatly appreciated...Thanks ErickFirst off welcome to the group! Livecycle can be an interesting program.
For me I am not very technically proficient in coding so I tend to gravitate to, how you say, less than elegant solutions. What I do is create an Email Submit button for each Radio button. Then I create a dummy Email Submit button (this part will be key later). From the Object Library view on each Email Submit button I set the Email Address and Email Subject that I want. Then I hide all of the Email Submit buttons with the exception of the dummy Email Submit button. From the Action Builder I then create an action on the dummy Email Submit that when the button is clicked to open a dialog box to say "Please Select an Option". I then create an action within the Action Builder on each Radio button to show the corresponding Email Submit button that has the subject line I need while also making sure to hide the dummy Email Submit button (and any other buttons if the user clicks several radio buttons). That worked for me in the past. Then I added a DocuReady event on the dummy Email Submit button to make sure it was visible and the other buttons were hidden once the form was open. Sort of a reset if you will. The downside is if the user changes nothing they still get a prompt to save the changes. I am sure that some of our more advanced coders can offer a fix to your code lines, but that is sort of the non-coder way to go about this.
Edit: Oh I forgot to say that if you want the buttons to appear the same to the user, just overlay them together. To the user there is no change. -
Why does disabling radio buttons change my formatted text size?
When I recycle through a multiple choice quiz i have created,
disabling the radio buttons also makes the label of the radio
button resort to a (circa) point 12 font. There doesn't seem to be
a way to get around this. Any advice?I guess you, like me, are a poor typist. There is a bug, but it only really shows up when you use the mouse to repeatedly position the cursor, or move around with the arrow keys.
My "work around" is to press enter about three times as soon as I get into the typing space. Then if I accidentally go "past the end of the formating" it does not turn to rubbish. I did not realise I was doing the pressing of enter, as I wanted to get my signature out of my face while composing, but it appear to have had side benefits I just was not aware of.
The other formatting hell you can get into is with text pasted from Microsoft Office. Any office suite can make things unpleasant for a while, but but the Microsoft product just stands out with it's references to Microsoft specific data structures and it's magical ability to make the mail ring the anti virus bell.. -
Radio button displayed before the text
Can any one let me know if there is any way of displaying a radio button on the selection screen before the text.
Regards
DeeptiUse..
selection-screen: begin of line.
selection-screen comment 1(12) comm1.
parameters R1 RADIOBUTTON GROUP RAD1.
selection-screen end of line.
Parameters R2 RADIOBUTTON GROUP RAD1 DEFAULT 'X'.
initialization.
comm1 ='Radiobutton1'. -
How to add image as radio button label instead of text
In a pure AS3 project, is there a way to add use an image placed in the library/ Flex/AIR SDK compiler path instead of text as a radio button label?
I've tried substituting character may unicode like:
rb1.label = String.fromCharCode("0x2592");
But how this displays is dependent on the device, font character availability. Displays unpredictably.
Would prefer anyway to use an image that I can create in AI.
Any help appreciated.OK. I tried this, and it works.
(Hopefully, the image will display in the same location, next to the radio button, on different devices.)
Thank you. -
Af:selectOneRadio : spacing between radio button and it's text
Hi All,
JDev 11.1.1.6
I want to put some space between two radio buttons (between two af:selectItem) say some 10px.
<af:panelGroupLayout layout="horizontal" id="pgl9">
<af:outputText value="1. New mobile phone connection"
inlineStyle="font-size: 12px; vertical-align: top; color: #f37f41; font-weight: bold; padding-left: 15px;"
id="ot23"/>
<af:spacer width="10" id="s15"/>
<af:selectOneRadio id="sor1" layout="horizontal" autoSubmit="true"
inlineStyle="padding-top: 5px; padding-left: 49px; padding-right: 20px;"
binding="#{backingBeanScope.ServiceReq.selectRadio1}">
<af:selectItem label="1GB Data" value="1GB Data" id="si2"/>
<af:selectItem label="10 GB Data" value="10 GB Data" id="si1"/>
</af:selectOneRadio>
</af:panelGroupLayout>
I tried setting it inlineStyle="margin:10.0px;" and also tried setting it in the css, but of no use.
Thanks in advanceHi,
<af:selectItem does not support inLine style therefore try to add sequence of non-breaking space(  ; ) for the label end of the radio
See
http://www.w3schools.com/html/html_entities.asp -
One stop button to control multiple loops?
I want to use on stop button to stop mutilple while loop at the same time. But if I put the stop button outside the while loop, it is functional.
Is there any way to do that?
Thankscguan wrote:
But if I put the stop button outside the while loop, it is functional.
I don't think "functional" is the right word here.
I often use event structures, e.g. as in my example posted here. This allows you to keep latched mechanical action for the stop button.
For a queued state machine, you would use the error to stop the loop that waits for the queue. Here is an example for that.
The most appropriate method really depends on the situation. Can you post some code?
LabVIEW Champion . Do more with less code and in less time . -
Using the CTRL button to select multiple text segments in Design Editor
Hi there,
This may be a fairly elementary question, however I'm very new to RoboHelp.
I'm currently building an online help text system, and when formatting my html files in Design Editor, I have to apply styles one at a time. I was hoping RoboHelp would have a function identical to Microsoft Word whereby holding down the CTRL key would allow you to select various segments in the file and apply the style. Eg. selecting only text you want to apply Heading 3 to.
If RoboHelp does not have this functionality, this project will take me in the vicinity of 7 years to complete. Thanks for your time.
Regards,
PKNo it doesn't work that way. What you need to do is create some character styles in your style sheet and apply those.
Paragraph styles are defined something like
P {
font-size: 10pt;
margin-top: 0pt;
margin-bottom: 6pt;
font-family: Verdana, sans-serif;
color: #000000;
font-weight: normal;
P.Normal-Indent {
margin-left: 20pt;
where the second P definition will inherit all that is in P plus add the indent.
When you select those styles, they will be applied to the whole paragraph.
You can also create characters classes. If you do it within RoboHelp, RH will write the CSS code for you. If you edit the CSS outside RH, then instead of writing P or some other tag, you would normally start with the full stop so you might have
.code {
font-size: xx-small;
font-family: Courier;
to apply the Courier font to a selection in any paragraph style.
In RoboHelp you need to prefix the character code with "span" to make it display in the dropdown, thus you would need:
span.code {
font-size: xx-small;
font-family: Courier;
See www.grainge.org for RoboHelp and Authoring tips
Maybe you are looking for
-
Document Library Template with Metadata Navigation and Key Filters
When saving a document library as a template, any configured metadata navigation and key filters columns are lost. Has anyone else experienced this issue or know a viable workaround? Can anyone shed some light on why these settings are not saved with
-
does 1 gen ipod have a microphone it say to conect one and how can i do that asap help
-
Airport Express over All Home Audio Tuner
I have an Airport Express hooked up to our all home tuner and trying to get the icon to show up in iTunes allowing me to choose between 'computer' and 'All Home Audio'. I have the green LED lit on the Airport Express, I have the right box checked to
-
Problem Report: Severe memory leak in Flash Player 9.0
Summary Flash player 9.0 is prone to a severe memory leak when playing SWF files produced by Captivate 1 containing full-motion recordings. Versions affected The problem reproduces with Flash player 9.0 (Flash9.ocx, Version 9.0.16.0) hosted in either
-
J1IFR report of subcontracting challans by material type
How to extract the list of subcontracting challans based on Material type selection.with Transaction J1IFR Krishna