Linking two drop down list together

I have two drop downs list and I need to link them together for the user to only answer one of them and it won't allow an answer in the other or vice versa. How can I set that up?
If answer drop down list A then can't answer drop down list B
else
if drop down list B is answered then drop down list A can't be answered.

The attached contains two drop-down lists - apples and oranges. Each drop-down list has a default list item value of " ", thus the default index is 0 (zero). If you select a value other than default, the other drop-down list has it's access protected and the list item reset to 0 (zero). Conversely, if you select the default value, the other drop-down list becomes open or accessible.
// form1.page1.apples::exit - (JavaScript, client)
if (form1.page1.apples.selectedIndex != 0) {
  form1.page1.oranges.access = "protected";
  form1.page1.oranges.selectedIndex = 0;
else {
  form1.page1.oranges.access = "open";
// form1.page1.oranges::exit - (JavaScript, client)
if (form1.page1.oranges.selectedIndex != 0) {
  form1.page1.apples.access = "protected";
  form1.page1.apples.selectedIndex = 0;
else {
  form1.page1.apples.access = "open";
Steve

Similar Messages

  • How can I use two drop down lists for one time value?

    I want to enter the length of time that someone does an activity in hours and minutes using two drop down lists, then enter them as a single time value (H:i:s) in Mysql.
    I've used the basic drop down lists, and a few different variations of the following with no success (seconds is a hidden field with a value of "00"):
                           GetSQLValueString(strftime('%H:%i:%s', strtotime($_POST["sleeptimemin"]." ".$_POST["sleeptimehr"]." ".$_POST["seconds"])), "date"),
    This returns 00:00:16, no matter what is selected on the drop down list.
    Any help would be appreciated.

    MySQL stores times in human-understandable format, using the 24-hour clock.
    GetSQLValueString($_POST['sleeptimehr'] . ':' . $_POST['sleeptimemin'] . ':00', "date"),

  • Dynamically manipulating two drop down lists

    Dear All,
    I am working with one form which has two drop down lists. Name of first drop down is State Name which is having all state names from database.Another drop down name is City Name and the values has to be populated from data base according to the first drop down value.
    Now I am able to generate first drop down from database . But I am unable to manipulate second drop down.
    Please anybody can help me to resolve this problem. Your suggestions are appreciated.
    Thanks

    Dear All,
    I am working with one form which has two drop down lists. Name of first drop down is State Name which is having all state names from database.Another drop down name is City Name and the values has to be populated from data base according to the first drop down value.
    Now I am able to generate first drop down from database . But I am unable to manipulate second drop down.
    Please anybody can help me to resolve this problem. Your suggestions are appreciated.
    Thanks

  • AJAX two drop down lists

    I found a lot tutorials out there showing you how to make one drop down list populates another one but most of them either render the second ddl html in javascript (dealing with DOM crap!) or use third-party controls such as ATLAS. Then I decided to come up with my own solution for the problem. What I did was wrap the regular ASP.NET drop down list with two strings and strip off the rendered html that is returned to the Ajax object. This provides me a lot of flexibility: One=> I can use the regular ASP.NET control not having to dealing with DOM objects in JavaScript. Two=> I can use the same technique to use any ASP.NET controls with Ajax.
    I posted this tutorial at www.KYNOU.com
    I hope you guys like it!

    I found a lot tutorials out there showing you how to make one drop down list populates another one but most of them either render the second ddl html in javascript (dealing with DOM crap!) or use third-party controls such as ATLAS. Then I decided to come up with my own solution for the problem. What I did was wrap the regular ASP.NET drop down list with two strings and strip off the rendered html that is returned to the Ajax object. This provides me a lot of flexibility: One=> I can use the regular ASP.NET control not having to dealing with DOM objects in JavaScript. Two=> I can use the same technique to use any ASP.NET controls with Ajax.
    I posted this tutorial at www.KYNOU.com
    I hope you guys like it!

  • How can i link two drop down buttons added dynamically

    guys got a wired problem but plz help.
    i m using jbuilder to create m y website.
    in this i got 2 drop down buttons.
    when the 1st(p1) 1 is clicked then second 1(a1) shows value respective of the value clicked in 1st 1.
    i dynamically add similar drop dowm on click of a button.
    but when value in the new drop down is selected (p2) it shows changes in 1st drop down (a1) not in newly created drop down(a2)
    could u guys plz help me out.
    its really urgent

    this is the code i m using to create the drop down
    ->
    var i=0;
    var option=new Array();
    function insRow(){
    var d=document.getElementById("div");
    d.innerHTML+="<select id='D"+i+"' class='input' onChange='getSh(this.selectedIndex)'><option>Select Here</option>"+
    <%
    rs=st.executeQuery("select * from productTab");
    while(rs.next())
    %>
    "<option><%=rs.getString("productName")%></option>"+
    <%}%>
    "</select>"
    d.innerHTML+="<select name='DD"+i+"' id='DD"+i+"' class='input'><option>Select Here</option></select>"
    d.innerHTML+="<select name='DDD+i' id='DDD+i' class='input'><option>Select Here</option></select>"
    d.innerHTML+="<input type=text name='T+i' id='T+i' class='input-time'><br>"
    option +=["DD"+i];
    option +=["D"+i];
    i++;
    function getSh(selectedcitygroup)
    document.getElementById("DD+i").options.length=1
    if(selectedcitygroup>0){
    for(i=0;i<cities[selectedcitygroup].length; i++)
    document.getElementById("DD+i").options[document.getElementById("DD+i").options.length]=new Option(cities[selectedcitygroup].split("|")[0], cities[selectedcitygroup][i].split("|")[1])

  • LiveCycle Designer 8.0 - Linked Drop Down Lists

    Hi,
    Im new to Adobe LiveCycle and trying to link two drop down lists. I want the second drop down list to have certain options visible, depending upon the choice selected in the first list.
    I have spent a bit of time with JavaScript and trying to link them, however am struggling.
    Can anyone advise?
    TIA, Mike.

    Hi Mike -
    You can accomplish what you are describing with an array.
    An example of what you are asking about can be found in the Live Cycle Interactive Purchase Order sample found at [installdir]\EN\Samples\Purchase Order\Interactive (at least that's where I found mine, I'm using Live Cycle Designer version 7).
    There are two drop-down lists in this Purchase Order sample: Country and State/Province. Only two countries are listed for the purpose of the example however you can customize the script by adding other countries.
    Look for the script object named 'countryScript'. It contains the logic invoked by the drop-down lists when the form is created and based on the user interaction.

  • Dynamic drop down list  with dynamic sql

    Hi all,
    I am facing a problem here..Please see if any one can help.
    I jave a JSP page which has two drop down list boxes.
    One list box is populated from the databse.
    ListBox1:
    values: kishan
    maha
    tony
    assuming all those were populated from database.
    ListBox2:
    values: Chennai
    Bangalore
    Hyderabad
    should come if "kishan" is selected from the first listbox.
    if "maha" is selected then
    Values: Delhi
    Goa
    Mumbai
    should be populated from the databse using the where condition
    got by the first selection.
    Both these boxes are in same page and i do not want to transfer
    this to another page..staying in the same how to accomplish this.
    An onChange function of the selection list on listBox1 can be
    written which gives me what value is selected. This i can get in
    Java script. But how to give this value to a jsp variable which
    queries the database using the selected value.
    Is there any other logic i can use.
    remember there is no request that is passed. both are in same page and on selection it should stay in same page populating the
    second one dynamically.Bcoz what i have said is the operation in one row.. the same should happed for 5 rows in a form so.. pls send me code if possible or links related to this problem
    please help.

    You can use Ajax ;-) or you do a server roundtrip (aka postback) i.e. the onchange event of ListBox1 submits the form and the server returns the same page with the updated ListBox2

  • How do I use one drop down list to refresh the list in another drop down?

    I am using a drop down list full of years (i.e. 2008, 2009..etc). When I make my selection from this drop down list (say for instance I select 2009) I want it to update the available data in the second drop down list. I have the query statement set up within the JSP page but it needs to be a dynamic SQL statement based off the value I selected in the first drop down.
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    The variable "year" is the value I need to figure out how to assign. Now this variable is a Java variable (attribute) and Im unsure how to get the value from the previous drop down and assign it to that. Basically I need the JavaScript value from the first drop down assigned to the Java attribute "year".
    Anyone able to help me with this???
    Thanks,
    Jed

    Here are my two drop down lists. As you can see I build the second list dynamically based off the value of the year. I want to be able to assign my year to the value I select in this first drop down. How do I do that?? I only want to show games for the year I select. I currently have the year hardcoded to "2009" as you see below. How can i change that to be assigned to the JavaScript value i extract from the first select box?
    <select name="season">
    <option value='2009' selected>2009</option>
    <option value='2008'>2008</option>
    </select>
    <select name="gameselect">
    <%
    try
    String year = "2009";
    String connectionURL = "jdbc:mysql://localhost:3306/ElmwoodExpos";
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection(connectionURL, "root", "thejedster");
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs = s.getResultSet();
    while(rs.next())
    %>
    <option value="1"><% out.print(rs.getString("GameDescription"));%></option>
    <%
    catch(Exception e)
    %>
    </select>
    Thanks,
    Jed

  • Drop down list value dependant on value in another drop down list

    Hi
    I am not familiar with Java Script so if anyone can advise me on this I would be grateful.  I am using ADobe Livecycle V8.0.
    I have two drop down lists - DDL1 and DDL2.
    The choices in DDL1 are "High, Medium, Low, None"
    The choices in DDL2 are "Positive, Negative, None"
    If "None" is selected in DDL1 I want DDL2 to display "None". 
    If any of the other values are selected in DDL1, then I don't want anything autofilled in DDL2.
    Hope this makes sense!
    Thank you.

    This should do the trick:
    in the "change" event of DropDownList1, put this:
    if (xfa.event.newText == "None"){
    DropDownList2.selectedIndex = 3; // at pos. 3, you should have "None"
                                                           // otherwise change here at your convenience
    else {
    DropDownList2.selectedIndex = 0; // here first element empty/default
                                                            // maybe you prefer the last one
    Note that generally dropdown boxes have the first or last element empty/default; this way, when you script the "else" part, you can easily reset DropDownList2.

  • How do I use a drop-down list to populate a list box

    I'm using livecycle 8:
    I basically have a drop down list with many selections available. I want the function to be when they select from the drop-down the choice they made appears in a list box next to the drop-down box. If they choose to add additional selections from the drop-down list they will add to the list field as well. If anyone has seen one of those on-line job application sites where you have a list of qualities on the left and you can select them and they populate to a list on the right, That is basically what I want.
    I'm not too familiar with adobe quite yet and if you can break the process down as much as possible I would greatly appreciate it.

    Here are my two drop down lists. As you can see I build the second list dynamically based off the value of the year. I want to be able to assign my year to the value I select in this first drop down. How do I do that?? I only want to show games for the year I select. I currently have the year hardcoded to "2009" as you see below. How can i change that to be assigned to the JavaScript value i extract from the first select box?
    <select name="season">
    <option value='2009' selected>2009</option>
    <option value='2008'>2008</option>
    </select>
    <select name="gameselect">
    <%
    try
    String year = "2009";
    String connectionURL = "jdbc:mysql://localhost:3306/ElmwoodExpos";
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection(connectionURL, "root", "thejedster");
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs = s.getResultSet();
    while(rs.next())
    %>
    <option value="1"><% out.print(rs.getString("GameDescription"));%></option>
    <%
    catch(Exception e)
    %>
    </select>
    Thanks,
    Jed

  • Populating Drop down List in Excel Planning Layout

    HI!
    hopefully somebody can help me.
    I have a simple planing function ( copy function: Version1 => Version2 ), Version2 the target version is a BEx Variable and a parameter of the copy planing function.
    basicly i want to put a drop down list on a Excel Planing Layout to manipulate the BEx Variable (Version 2 - the target version). So that the user can fill the BEx Variable by selecting the version by the dropdown list.
    In BW-BPS is quite simple -but unfortunately i dont know how it works in BW-IP.
    Best Regards
    Mike
    Message was edited by:
            Mike Khatib

    Hello Mike,
    First you create two Drop Down lists (Dimension Version, Read Mode Masterdata table) in your workbook. Now go to the Visual basic editor (alt+F11) and you will find the following code for each Drop Down list:
    Public Sub DROPDOWN_22_LostFocus()
      Dim lComboBoxName As String
      Dim BEx1 As Object
      On Error Resume Next
      lComboBoxName = "DROPDOWN_22"
      Set BEx1 = Application.Run("BExAnalyzer.xla!GetBEx")
      Call BEx1.RaiseComboBoxChange(Parent.Name, lComboBoxName)
    End Sub
    Comment the last line and add a function to output the chosen value to a cell in the workbook
    Public Sub DROPDOWN_22_LostFocus()
      Dim lComboBoxName As String
      Dim BEx1 As Object
      Dim version As String
      'Call Dropdown List
      On Error Resume Next
      lComboBoxName = "DROPDOWN_22"
      Set BEx1 = Application.Run("BExAnalyzer.xla!GetBEx")
      'Call BEx1.RaiseComboBoxChange(Parent.Name, lComboBoxName)
      'get version
      version = DROPDOWN_22.Text
      'output chosen version to a cell in the workbook
      Range("C801").FormulaR1C1 = version
    End Sub
    Now add a command range to your workbook (VAR_VALUE_1,1, <VERSION>). That’s it.
    If you need further information don’t hesitate to ask me!
    Best regards
    Johannes
    PS: Please assign points if this information was helpful

  • Create a drop down list that populates based on the selection form another drop down list.

    I need to set up a drop down list that is popualated (i.e. displays a certain list of selctions in the drop down list) based on the choise the form user selects in an adjacent List
    For example
    There are two drop down list field sitting side by side in the form
    1. Select State          2. Select Course
    What I want to do is have a list of states in the first drop down list (1.Select State) and depending on which state the form user selects , the second drop down list (2.Select Course) will populate with a selction of courses available in that selected state only (i.e. it will on;y show course available in QLD if QLD is selcted).
    Is this hard to do?

    Hi,
    I would recommend some posts from Stefan Cameron's blog:
    http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/
    http://forms.stefcameron.com/2006/12/07/better-form-design-with-xfa-25/
    Hope that helps,
    Niall

  • How to assign drop down list in XML form to properties

    Hi ALL,
    When i was creating <b>Edit form</b> in XML Forms Builder,for <b>Bulletin Board</b> Application, i had to assign two drop down list boxes to properties created under Content Management Configuration > Global Services > Property Metadata. Can any one help me how to ASSIGN it or provide any related documents.
    Suitable replies will be rewarded, for sure.
    Regards,
    Shankar

    Hi Shankar
    Please have a look at this document, especially the part about the cookbook. It explains how to add properties in a dropdown list to your XML form.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ee639033-0801-0010-0883-b2c76b18583a
    Good Luck!
    Barry

  • Adobe Forms - Drop Down list

    Hello,
    I have two drop down list(s) in my adobe form.
    1) Employee Group
    2) Employee Subgroup
    Employee Subgroup drop down list is populated dynamically depending on Employee Group selected on form.
    Now the issue is :
    If the current value of EMp Grp = 01 and EMP sub grp = 07
    Now if Emp Group is changed to 02, EMP subgroup drop down is again built in backend. So the EMP subgroup gets new set of values BUT with additional row (value = 07) of previus EP subgrp.
    So the values are:
    81
    82
    83
    07  (This is old value which should not come)
    How can i delete this value using script and in which event?
    Regards,
    Ashish Gupta

    Hi Ashish,
    On Change event of the EMPgrp Dropdown say DD1 for EMPSubgrp DD2 write the code:
    if (DD2.rawValue ne null)
    then
    DD2.deleteItem(DD2.selectedIndex)
    DD2.rawValue = ""
    endif
    And make sure this script runs before the new values in the DD2 are fetched.
    Regards,
    Vaibhav

  • Drop down list driven by drop down list

    I have two drop-down lists, the second one is driven by the first selection, I am wondering how to do it.
    Is it similar as the page refreshed by drop-down list?

    Check out this Coordinated Dropdown Sample Application :
    http://developers.sun.com/prodtech/javatools/jscreator/reference/code/sampleapps/2/2update1/CoordinatedDropDowns.zip
    This application demonstrates how the powerful event handling mechanism in JavaServer Faces can be used to dynamically update the state of various components on a single page.
    HTH,
    Sakthi

Maybe you are looking for

  • Open orders in PPDS

    Hi Gurus,               We are using PPDS in that DS had created 1000kg of materail A and released to PP (ECC) , actually produced is 800kg and my question is 1. Where can i see my open orders in PPDS? 2. Can i move the open orders for next day or ne

  • Error installing Oracle 9.02.0.1 on Linux

    I'm trying, without success, install Oracle on my personal computer (a stand-alone pc). I'm a beginning on Linux. When I run the runInstaller file, this occurs: Initializing Virtual Java Machine............. - X11TransSocketINETConnect: Can't get add

  • Premiere Elements 10 Bad/No performance on Win 8 64-bit Core i5-4440 16gig ram and GeForce GTX-650

    Since just over a year i'm the owner of Premiere Elements 10, however it has never pleased me due to bad and inconsistant performance. Just putting video's one after another without any transitions works so-so a few frames per second (which is redicu

  • Governance, Risk, and Compliance

    Hi experts, I am very new to this module. Can anyone provide some material nd s/w regarding this module? one morethng i dnt have assistance like where to strt nd all dat...can anyone help out pls? Is this related to QM module?and please guide me hw t

  • Hi:- I forgatwd my passcode on my I pad please tel me how I can opening my I pad

    Hi:- I forgatwd my passcode on my I pad please tel me how I can opening my I pad