Linked Drop Down Lists with a message box

Hello all -
I'm using Adobe Designer 7.0 and I've created a form with two linked dropdown lists. The second dropdown list displays certain options depending on what was selected from the first dropdown list. I based my dropdowns on the country/states dropdowns in the Interactive Purchase Order sample found at [installdir]\EN\Samples\Purchase Order\Interactive.
But I also want to display a message box (with a helpful explanation) when the second dropdown list is clicked before making a selection from the first dropdown list. Right now, a tone sounds when that happens. I think it would be helpful to provide an explanation (in a message box) instead of just the tone.
I tried this javascript on the second dropdown click event, but it displays the message box all the time, not just when the first dropdown was unselected:
if (dropdownlist1.rawValue == " ");
xfa.host.messageBox("Please choose a value from dropdownlist1 first.");
Can anybody show me how to display the message box only when dropdownlist2 is clicked and a selection has not yet been made from dropdownlist1?

The best thing is to dynamically build your where clause based on the user selection. Test the values of all form fields and if the user does not make a selection, do not include that in the where clause.
Trying to build a single, static where clause that accounts for all possible user input permutations is extremely difficult.

Similar Messages

  • Error message when populating drop-down list with mysql DB

    Hi everyone,
    i'm having an error message which gives zero result on google...
    here's the context: i have a drop-down list called "Patient" in the template pages of a livecycle form. The binding is set to Global so that the value is the same on the two pages of the form. I have also linked the items of the list to a mysql database (with DataConnection) by clicking the "Specify Item Values" link on the Binding tab of the element.
    now, when i open my form (or preview) i get this message, in french:
    "Propriété incorrecte de l'opération SET; dataGroup ne possède pas de propriété id."
    which is, in english (personal translation):
    "Incorrect property of the SET operation; dataGroup doesn't have an id property."
    this message appears in a messagebox, the background is empty (standard gray color)
    Then i click "OK" (which is the only button available), and my form appears, the list is populated with the values of my database table, so it actually works...
    As i said, i have zero results on google with this message...
    any idea what it means and how to avoid it?
    Thanks!

    Hi,
    For all things XFA Forms and Databases there is no place better than Stefan Cameron's blog: http://forms.stefcameron.com/.
    Have a look here: http://forms.stefcameron.com/2006/12/18/databases-inserting-updating-and-deleting-records/ and at comment 60.
    Good luck,
    Niall

  • 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

  • Populate a drop down list with data from Excel and fill in a text field, based on drop down selectio

    Hi!
    I have a problem with a PDF form: There's a drop down list that I populate with Excel data that I've put in an XML file through an XSD file -- no problem here. The drop down list has a data binding to the XML file, so that a choice in the drop down list can be associated with an object in the XML file. So, when I make a choice in the drop down list, a corresponding object value is fetched from the XML file and put in a text field on the form.
    How to do this is described by Stefan Cameron here:
    http://forms.stefcameron.com/2006/07/29/dynamic-properties/
    There's a snag, though, and to describe it more clearly:
    The XML file contains three types of objects: role, role number, and role cost center. Of these I use the first and the third, i.e. the role and the role cost center. The drop down list contains the roles, and when I select a role, the corresponding cost center is filled out in the text field. So far, so good!
    But -- if the cost center has the same value for two or more roles, all of these roles "bounce back" into the drop down list, that is, they are all selected in the drop down list. How many of these you can see depend on the height of the drop down list -- if it's low you'll only see the first one.
    If I modify Stefan Cameron's data in his example I get the same behavior, so the problem seems to have to do with how XML data are fetched.
    I'm sure there's a workaround, but I can't find it! I've spent many hours browsing the web without finding anyone with a similar problem.
    Any suggestions appreciated!

    Although your issue is far beyond mine, I was hoping you can help me out.....
    I need to create a drop down list of names which I wish to somehow link to an Excel spreadsheet.
    Please let me know the steps I need to do.  I've tried several things, but nothing seems to work and I'm not sure what I am doing wrong.
    Thank you

  • 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.

  • Is there a way to see the actual fonts in the "choose a font" drop-down list of a message window?

    When selecting a font for a message in Thunderbird, the only way I can find to see what the font looks like is to actually change the font of text I've already written. To try more than a few fonts at random would be a sheer waste of time.
    I'm using an older version of MS Word, which has the option of allowing the user to see the actual fonts displayed in the font selection drop-down list.
    Is there any way to set up Thunderbird to do this?

    The short answer is no.

  • Error while populating drop down list with values from a database

    Hi all,
    I have a JSP page with a drop down list that is to be populated with values from a database.
    This is the code in my JSP file:
         <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) { %>
                       <option value="<%=iterator.next().intValue()%>"> <%=iterator.next().intValue()%> </option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>   The DataManager.java class simply forwards this to its respective Peer class, which has the code shown below:
          package seatplanner.model;
        import java.sql.Connection;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        import java.sql.Statement;
        import java.util.ArrayList;
        /* This class handles all floor operations */
         public class FloorPeer
         /* This method returns all the floor numbers */
         public static ArrayList<Integer> getAllFloorNumbers(DataManager dataManager) {
            ArrayList<Integer> floornumbers = new ArrayList<Integer>();
            Connection connection = dataManager.getConnection();
            if (connection != null) {
              try {
                Statement s = connection.createStatement();
                String sql = "select ID from floor order by ID asc";
                try {
                  ResultSet rs = s.executeQuery(sql);
                  try {
                    while (rs.next()) {
                      floornumbers.add(rs.getInt(1));
                  finally { rs.close(); }
                finally {s.close(); }
              catch (SQLException e) {
                System.out.println("Could not get floor numbers: " + e.getMessage());
              finally {
                dataManager.putConnection(connection);
            return floornumbers;
         }  The classes compile properly, but when I load this page up in Tomcat it just freezes and does not load the form. I tested the DB connection and it works fine.
    What am I doing wrong in the JSP code?
    Thanks for the help in advance.
    UPDATE: I commented out the form, and added <%=floornumbers.size()%> right above the commented code to check if the ArrayList is indeed getting populated with the values from the database (the values are of type integer in the database). The page still freezes like before. I'm puzzled now :confused: .

    Wrong usage of Iterator.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) {
                                    Integer inte = iterator.next();
                            %>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>or make use of enhanced loop as you are already using J2SE 5.0+ for avoiding confusions.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% for(Integer inte:floornumbers) {%>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <%}%>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>and a lot better thing would be making usage of basic Taglib provided with JSTL spec or struts spec which make life easier and simple.
    something like usage of <c:forEach/> or <logic:iterate/> would be lot better without writing a single scriptlet code.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Firefox tab to fields and drop down lists with Mac OS X 10.5 (Leopard)

    Has any one else noticed some problems after upgrading to OS X 10.5? It seems I can't tab to every field, such as the "Keep me signed in for today" checkbox on ebay's login page. I used to tab to it before upgrading. I'm also tabbing past some drop down lists where you select the state where you live in sign up pages. And before you suggest it, I have already turned on "All Controls" in System Preferences->Keyboard & Mouse. I don't think that affects Firefox anyway since it is a system controls option and doesn't affect the actions in a browser window.
    Also, some drop down lists no longer drop down. I can focus on the list and even change the value using the up and down arrows, but the full list is no longer displayed. Again, this changed with the upgrade to Leopard.
    If any one has experienced these specific issues or something similar please share your thoughts and solutions.
    Mark

    I am also having the drop down problem on my macbook, it's getting really annoying. On top of that, twice today (i just got the macbook three days ago) my keyboard will just stop working- i cannot type in firefox nor in finder or word.

  • ISR drop-down lists with ZCI layout

    Hi,
    We are developing a custom ISR scenario on Netweaver 2004s SP11 and Adobe LiveCycle Designer 7.1. Our Interactive form has a drop-down list which is supposed to get prefilled. When we use the ZCI layout, the drop-down is not showing any values. If we simply change the layout type to Standard, it is working fine. While using ZCI layout, we inserted the webdynpro script and used ISR native controls.
    Why the drop-down is not working with ZCI layout? Are we missing any thing?
    Appreciate your response
    Thanks
    Ram

    It is solved. The issue was with binding.

  • Where is the drop down list with "edit web part" for a list??

    In Sharepoint 2010, there was a drop down list to the far right of a list.  One of the options was to Edit Web Part.  In Sharepoint 2013, I can't find the drop down list.  Nothing is to the right of my list and mouse overs down't reveal
    anything.  I am trying to get to that area to change my toolbar type.  Any clues as to where the "edit web part" has gone to?

    I've been able to edit Web Part properties for weeks, but a few days ago, I could no longer do it, either by using the checkbox in the upper right corner of the web part or by using Web Part Properties in the Web Part tab.  It's greyed out.
    Then yesterday I could do it again and today I can't.   An intermittent problem!
    No one has changed any Sharepoint Admin settings.
    Anyone have any ideas?  They would be greatly appreciated.

  • Populate drop-down lists based on check box selections

    Hi. I'm creating a Service Work Order form. At the top, there are several check boxes for the various services we provide, under that , more text fields, drop downs and checkboxes to elaborate on those services, and then at the bottom, fields for pricing.
    I'd like the top half of the form to drive the pricing info that is available or that auto-populates at the bottom.
    Ideally, I'd like to make the pricing specific based on 3 things:
    the service checkbox
    the client
    and the details on that service
    For example:
    If Client XYZ wants Service A that includes subservice B
    $123 should show up on the bottom half in the field for that service
    If Client ABC wants Service B that includes subservice C
    $456 should show up on the bottom half in the field for that service
    Does that make sense?
    I've been unable to get code to work in either the calculate and pre-Open options
    I first tried calculate and used this code (which was just a guess on my part)
    if (CheckBox1 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox2 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox5 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox6 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox7 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox8 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    else
    $.rawValue = 0
    endif
    That didn't do anything but give me an error about "and"
    So I tried putting code in pre-Open:
    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems();
    // repopulate the items based on the checkboxes
    if(offshore.rawValue == 1)
        this.addItem("$40.00", "offshore_001");
        this.addItem("$45.00", "offshore_002");
        this.addItem("$50.00", "offshore_003");
    if(inland.rawValue == 1)
        this.addItem("$40.00", "inland_001");
        this.addItem("$45.00", "inland_002");
        this.addItem("$50.00", "inland_003");
    I got no error but nothing populated and the drop-down was, in effect, disabled.
    Any help would be appreciated.
    Thanks!

    Gavin,
    This sounds like an issue that is not related to JHeadstart. To simplify the test case, you could create a simple drag-and-drop ADF application without JHeadstart and see if the same problem occurs there.
    Your suggestion that it is related to the where clause seems likely. Please find out what kind of object USER_ENV is, and how it is initialized. Maybe this initialization is skipped when bouncing the application.
    What happens if you perform the query in SQL*Plus, without doing anything about the USER_ENV?
    Maybe you should ask the Oracle Applications discussion forum...
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Is there a way on a MAC to create a Combo Box Drop Down list with multiple email addresses?

    I'm trying to create a Submit To button on a form that allows me to choose between five different people and their email addresses.
    This one form can be sent to five different people, and if I just want to send to one, how do I program that in a combo box?
    Can anyone please help??

    Yes I believe JavaScript may be the answer because I can't seem to get anything else to work.
    Currently the email will only need to be sent to one recipient at a time.
    I am very unfamiliar with JavaScript and am just starting to dive into it. Would you be able to help me with the coding?
    Thank you this sounds very promising!

  • How to use a drop down list with a Timestamp column

    Hi,
    I have a table which has a column "updated date" of every row. This column is Timestamp.
    Now I want to filter the rows which are updated in the last one hour, last three hours, last 12 hours etc.
    The strings last one hour, last three hours etc can come from HR_LOOKUPS or anywhere else.
    I have to use query panel.
    Is it possible to achieve this?
    Thanks,
    Subhranshu

    ist not a good practice tho divya....the prob here is, u need to check for the condition for all the 50 states that u have hardcoded..
    if u dont mind taking that pain, u can check the condition using a scriplet..
    say..
    <% if (request.getParameter("sate").equals("TEXAS")
        %>
    <option selected >LA</option>
    <% } else { %>
    <option >LA</option>
    <% }%>regards
    [email protected]
    ps: i know a person named divya shashi..i was wondering, ar eu from south india by any chance?

  • Can I have a blank field on my document when using a combo box with a drop down list in Word 2011 for Mac?

    I am creating a drop down list using a combo box in the Developer tab. Once I protect my document I want the field to remain empty and not show any of the items on my drop down list. Is there a way to do this? Currently it shows one of the items on my list.
    Thanks

    Paul's answer is correct.
    Since this is a Word IT forum for Windows, in the future you should use the
    answers.microsoft.com forum. It specializes in Word for the Mac. BTW - Paul stops by there also, so you'll still get his advice from there. :-)
    Kind Regards, Rich ... http://greatcirclelearning.com

  • 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

Maybe you are looking for