Variable drop-down lists according to radio-button input

I need to restrict the display of drop-down lists according to a particular radio-button selection earlier on the form. Can I use a javascript call on the client side without linking to an external database along these lines:
If radiobutton1 == 1
then dropdownlist1 uses list1
elseif radiobutton1 == 2
then dropdownlist1 uses list2
and so forth.
Obviously the syntax is incorrect, but I need to know if it can be done before digging in further.

Let's assume we have tree grouped radio buttons in a group of buttons, and a combo box object which displays a different list of elements depending of the chosen option.
A very simple way to do it would be, for example, the following one:
b [*] Radio Button Group - OnClick Event
i // List of elements that will be loaded in the combo box object
> var colorList = new Array("White","Blue","Red","Green");
> var dayList = new Array("Monday","Tuesday","Wednesday","Thursday");
> var tmarkList = new Array("Nike","Adidas","Reebook","Levis");
i // ComboBox Object
> var combo = xfa.resolveNode("Formulario1.ComboBox");
i // Cleaning the combo...
> combo.clearItems();
> combo.addItem("Select one option to the list","");
i // Filling the Combo
i // "this" returns a button group where there are three radio buttons
i // and the "rawValue" returns the selected index chosen in radio
i // buttons.
> switch(this.rawValue)
> {
> case "1":
> for(nJ = 0; nJ < colorList.length; nJ++)
> combo.addItem(colorList[nJ]);
> break;
> case "2":
> for(nJ = 0; nJ < dayList.length; nJ++)
> combo.addItem(dayList[nJ]);
> break;
> case "3":
> for(nJ = 0; nJ < tmarkList.length; nJ++)
> combo.addItem(tmarkList[nJ]);
> break;
>}

Similar Messages

  • Environment Variable Drop Down List

    Hi
    Apologies if this is a daft question, but is there any way to get the 'Use environment variable' drop down list in the 'Set Parameter Value' popup window in SQL Server Management Studio to order alphabetically by variable name?
    Currently, in my list I have over 100 variables for various SSIS projects and this number grows weekly.  When I create new environment variables and then try to assign them to project parameters/connections, it can be very time consuming to find them in
    the drop down list as there is no sort applied to the presented variable Names.
    If there is a solution for this then it would make my SSIS deployments so much easier and less time consuming.
    Many thanks.

    Do you mean this dialog
    Then no, but you can submit an enhancement request at MS Connect
    Arthur My Blog

  • Using a variable/drop down list in header of planning layout

    Dear all,
    I have created a simple BPS application for purely GL planning (No CO related objects like cost centre involved). I have the following characteristics in the header of the manuel planning layout.
    Business area
    Chart of accounts
    Company code
    Currency
    Currency Type
    Fiscal year
    Fiscal Year Variant
    Fiscal year/period
    Value type
    Version
    I have created variables for Business area, Fiscal Year, Fiscal Year Period, Posting Period and Version. The client wants either a variable or a drop down list for these characteristics in the header in the web application. When I assign a variable and put the characteristic in header, I get the error message in the web application saying header characteristic can only have a fixed value. Can someone tell me if it is possible and if so than how? I'll be very grateful for any inputs. Thanks a lot.
    Regards,
    Sumit

    Hi,
    When you create a variable, assign some values to the variable. These then become available in the drop down box. Ths first time a Web interface is called, these variable values are initial.As a result, u get the error messages. Select the variable values and then the error message should go away.
    Thanks,
    -NS

  • Firefox 3 used to have a drop down list under the back button for recent pages. How do I get this in FF4?

    FF3 used to have a drop down list of the most recent pages that a tab had displayed under the back arrow button. FF4 does not appear to have this. How can I see history of what's been displayed in the tab say four or five pages back?

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • Help writing code for drop down menus and/or radio buttons

    Hey, new to the forums, fairly new to programming in Java. I want to put up a "Ebay store", on Ebay.... well I guess that's obvious. I want to make a menu that either incorporates "Drop-down menus" (preferred - see below) or radio buttons. I do not know how to code these or how to incorporate them with the Ebay interface so that the new options selected by the customer with automatically adjust the price of the item. All help is appreciated.

    I'm guessing what you want to do has nothing to do with Java. It probably has more to do with JavaScript. You are probably going to have to learn a little HTML (Drop-down menus are really select boxes) and then some JavaScript to go along with it (onChange="javascript: doPriceChange();"). I have absolutely no idea about the EBay interface so this is all just a guess. Here's a google search for adding javascript to a select box.
    http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=javascript+select+onchange

  • How to Populate a drop down list using the values of a text field?

    Hi,
    I wanted to Populate the items of my drop down list according to the value entered in the textfield above it?
    also the value of list remains consistent in other rows also where i am using the drop down list field.
    Please Try to help me in this query.
    Thanks in Advance!!!
    I am using Javascript in adobe version ES 8.2.

    Part II:
    If you have other items for your droplist(s) that are to appear in addition to the "variable language" entered by a user you can add that to the script.  For example in addition to the Party1 and Party2 name appearing in my droplist I also want the list to have an option for a user to select: The parties jointly.  I add this to the script:
    this.addItem(Party1.rawValue);
    this.addItem(Party2.rawValue);
    this.addItem ("The parties jointly");
    If you have trouble making it work, post a bit of your actual form requirements.

  • How to display Current Year and Month in Drop Down list

    Hi Dear friends,
    I am devloping a report. It has got 2 pages--input and output(Report) page.
    IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
    Now, my problem is:
    HOw to display current month and year by default in the dropdown list...........
    I hope my question is clear.
    Please help.
    Regards,
    ASh

    NO da,
    it is not working.
    First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
    So, i posted the question.
    I tried your code. It is giving following error.
    A Servlet Exception Has Occurred
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
    first.set(Calendar.YEAR, 2003)
    ^
    An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
    out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
    ^
    4 errors
    Pls. Help.
    Regards,
    Ashu

  • How to populate data from dynamic drop down list to the text field

    Hi,
    I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
    Please see the link below.
    https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
    Thanks for your help
    Cindy

    Hi Rosalin,
    Loop the hidden table, get the values and populate drop down in each iteration.
    DropDownList1.addItem("Text","Value");
    You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
    Hope this helps.
    Thanks & Regards,
    Sanoosh

  • Conditional validation for drop down list

    Hi all,
    I have been working on getting the conditional validation for drop down list to work but no luck. Here is my situation. I have a page with 'time' and 'source' drop down which contains a list of values along with null value. I have two buttons 'save' and 'close'. when a User clicks on 'Save' button, no checking should occur and the values filled in the form should be stored into the database. When a user clicks on 'Close' button, validation should occur and messages should be displayed saying 'values should be filled' . After the user fills each drop down list and hits close button, changes should be saved to the database. I used the technique posted by Jayashri and wrote the validation code in 'Close button action method'
    Here is my code
    public String btnClose_action() {
    // TODO: Replace with your code
    try {
    if (ddlTime.getSelected() == null || ddlTime.getSelected().equals("")) {
    FacesMessage message3 = new FacesMessage("Please select a value");
    message3.setSeverity(FacesMessage.SEVERITY_ERROR);
    getFacesContext().addMessage(ddlTime.getClientId(getFacesContext()), message3);
    return null;
    if (ddlSourceReq.getSelected() == null || ddlSourceReq.getSelected().equals("")) {
    FacesMessage message4 = new FacesMessage("Please select a value");
    message4.setSeverity(FacesMessage.SEVERITY_ERROR);
    getFacesContext().addMessage(ddlSourceReq.getClientId(getFacesContext()), message4);
    return null;
    sendMail("close");
    } catch (Exception ex) {
    return null;
    public String btnSave_action() {
    // TODO: Process the button click action. Return value is a navigation
    // case name where null will return to the same page.
    sendMail("save");
    return null;
    I did not set the 'required' property of both the drop downs and I dont have any message components in the page. How do I get this to work. Please help.
    Thanks,
    S

    Hi,
    Try this
    HTP.p('
    function validate_form_fields()
    var validation = true;
    if (document.forms[0].fld_1.options[document.forms[0].fld_1.selectedIndex] == null )
    validation = false;
    alert("Selection of FLD1 is mandatory.");
    if (document.forms[0].fld_2.options[document.forms[0].fld_2.selectedIndex] == null )
    validation = false;
    alert("Selection of FLD 2 is mandatory.");
    return validation;
    ');If the above does not work, it could be the definition of the your fld_1 select - options. Looks like they allow null values, and if null is not the first option then selectIndex = 0 will be a not null option by default.
    Moreover, the below has redundant condition as ==0 and &lt; 1 amount to the same thing. selectIndex cannot be negative.
    if ((document.forms[0].fld_1.selectedIndex == 0 ) || (document.forms[0].fld_1.selectedIndex < 1 ))Regards,

  • Tables and Drop Down Lists

    This is my first time using LiveCycle Designer (8.2)
    I've tackled quite a few things thanks to the information I've found in these forums, but I have reached my complexity limit.
    I am trying to create a survey form that follows a process map with sub-process maps.
    Just to provide an idea of magnitude, one process map has eleven sub-process maps.
    I created a dynamic table with the ability to add and delete rows on a flowed page.
    The first row first column contains a drop down list.
    For each selection in the drop down list, the form requires eight inputs.
    Currently, I just copied the dynamic table for each subprocess.
    Each sub process map will have a running calculated total based on two inputs and a cost based on input.
    The overall process map will have the same.
    The entire section should seperatly show a sum total.
    I don't really know what would be best, but was thinking something along these lines:
    based on the selection in the drop-down-list, if someone selects one of the sub-process maps
    the row changes to allow the drop-down-list to be the one associated with that subprocess and
    the two running totals show up and remain at the bottom of the table.
    Only problem, is I have no idea how to do this.
    I have tried making the tables invisible, but they still show the input areas of the input boxes.
    Anyone feel like helping me figure this out?
    Also, isn't there a way I can populate a drop down list using EXCEL?  I don't want to manually input thousands of process titles.
    Oh, I don't have any XML capabilities, I am not connected to a server or any database, and everything runs at the client.

    Thanks for the input, I will watch the video.
    I was suprised that no one offered up any suggestions.
    I changed the design of the form.  I didn't want to, but I was able to get the product out on time.
    Just out of curiousity,
    Can I have a dynamic drop down list (A = {a1, a2, a3, a4}) that populates another drop down list (B = {b1, b2, b3, b4, b5} ) in table (Tb1) with one of the choices in the second drop down list (B = {b5}) is a dynamic choice that makes multiple expanding tables (Tc2, Te4, Tf5 out of a total of seven tables) appear each with their own (unique) drop down list?
    Or,
    Would it be easier to have the first choice (i'm probably using this word incorrectly) "index" the options for the other drop down lists, etc....

  • How to initialize a Prompt drop-down list using a Repository Variable.

    Hi,
    the aim is to fill a drop-down list of a Year prompt only with year values that can provide data.
    This Show list SQL statement works:
    SELECT Time."Year" FROM "AnalysisCatalog"
    WHERE Time."Year" <= 2007
    Using the maxYear Repository Variable does not work:
    SELECT Time."Year" FROM "AnalysisCatalog"
    WHERE Time."Year" <= @{biServer.variables[’maxYear’]}
    Error Codes: G689FFB3:SDKE4UTF
    Expression: biServer.variables[’maxYear’]
    How can I achive the result without hardcoding the Year 2007?
    Mny thx Thomas

    Hi,
    Actually this error does not cause any harm except a presentation inconvenience. In my multi-select prompt I am using variable expression with dynamic repository variable. Dashboard results are correct. Just variable's value does not appear on page (error Error Codes: G689FFB3:SDKE4UTF
    Expression: @{biServer.variables['CUR_CAL_PER_MONTH_NAME']}). Pushing "GO" button on the prompt fixing the error but it's actually second execution of the dashboard.
    Any ideas ??

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • Drop down lists and email buttons

    I am creating a form and I have about twenty items in a drop down list. I was wondering if and how I can set it so each item selected will cause an email button I have to change address. i.e item 1 sets the email button to [email protected] and item 2 sets the button to [email protected] I think it has something to do with binding but I only have basic training so I am lost. Any help that you can give will be greatly appreciated . Thank you in advance

    As mentioned, you can´t do that in InDesign but fortunately it´s fairly easy task to do in Acrobat Professional. You didn´t mention what are you sending, just an empty email that sender can fill in email client, whole PDF as attachment or some form data from PDF... all those options are possible by few lines of javascript in Acrobat side.
    I made you a quick sample which just opens up an email client, populates email address based on choise that user has made in combobox and some custom subject and body meassage text. You can find it from my dropbox: https://dl.dropbox.com/u/17227987/sampleform.pdf
    There´s only two formfields in that PDF; combobox for choosing email recipient (AA = [email protected], BB = [email protected] etc) and submit button. Check javascript code from
    -combobox´s properties > Validate tab and
    -button´s properties > Actions > Run a javascript.
    In combobox, small javascript sets the myemail variable´s value based on the choise user makes. In Button there´s small javascript that triggers the email client and uses the value of myemail variable as a target email address.
    ps. this sample probably works only in Acrobat and Adobe Reader. I have no idea how for instance MacOS Preview supports PDF javascript, probably not very well....=)

  • How do I populate a drop-down list from a schema variable

    I'm a novice programmer and new to the LiveCycle environment. I need help to populate a drop-down list in LiveCycle from a hard coded variable within my form's schema. I have a list of 28 names (the number of names and actual names change annually). That list is used over 30 times within a form for different selections. Since the list rarely changes, I would prefer to hard code it and make changes to the schema when they occur.
    If I can't find a solution, I will be updating over 30 separate drop-down list objects each time there is a change to the list.
    Thanks in advance for any help
    Chris

    Can you post your schema to [email protected] and I will have a look. You will also need to indicate which node in the schema is supposed to populate the dropdown.

  • How to link Files to different buttons in a drop-down list?

    I have 5 Excel files in folder. I want to link each file to each buttons in a Drop-Down List, so that when 1st button is clicked it opens 1st file, 2nd button opens second file etc..
    the buttons are given some titles.
    The file path should not be visible to the user. When a button in drop down list is clicked, it must confirm the file and open it.
    I am new to labview. Can anybody help me witha sample code?
    Sunitha

    Hello,
    I think you can get some ideas from this exemple.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    launcher.vi ‏89 KB

Maybe you are looking for

  • Creating vertical line in pages

    How do I include a vertical line in every page of my Pages document?

  • QM & PM Calibration Process Configuration

    Hi I wanted to configure a calibration process. I have made the settings for PM and QM integration but unfortunately in our implementation QM is not in scope but I need to do the QM settings which will be required for calibration. Can anyone provide

  • How to create tab pages in Human task Using Wizard

    hi, how to create tab pages in Human task Using Wizard.i need to display the personal details and the offical details in the same page with different tabs for each.it is possible to do lika this.if yes,how can we do this. Regards

  • IPlanet Web Proxy Server 3.6 and emptying out the cache.

    Hello. I'm wanting to empty out our proxy server's cache in an attempt to resolve one of our users help desk problems - a web site they are accessing is not loading correctly when going through the proxy server, bypassing the proxy server works. The

  • Starting weblogic server from java program

    Runtime r=Runtime.getRuntime(); Process p=r.exec("cmd /c d:/bea/weblogic700/server/bin/setWLSEnv.cmd"); when ihave given like this it is working. now i want to start weblogicserver from jav program String s="-Dweblogic.Domain=mydomain weblogic.Server