How do I enable multiple dynamic drop down boxes?

I'm using Windows 2000, Java SDK 2 Standard, Tomcat, Apache, Microsoft Access and Macromedia Dreamweaver Ultradev 4.
With UltraDev I'm trying to create a jsp page that has more than one dynamic drop down box or more than one dynamic select list box. I can show one dynamic object and as many static objects as I need. But when I add a second dynamic drop down box, with a second recordset, the page will only display the first dynamic object and all content following that object will not display.

Here's the code:
<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%>
<%@ include file="Connections/conn.jsp" %>
<%
Driver DriverRecordset1 = (Driver)Class.forName(MM_conn_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_conn_STRING,MM_conn_USERNAME,MM_conn_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT STATE_NAME, COUNTRY FROM STATE");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%>
<%
Driver DriverRecordset2 = (Driver)Class.forName(MM_conn_DRIVER).newInstance();
Connection ConnRecordset2 = DriverManager.getConnection(MM_conn_STRING,MM_conn_USERNAME,MM_conn_PASSWORD);
PreparedStatement StatementRecordset2 = ConnRecordset2.prepareStatement("SELECT FIRSTNAME, LASTNAME, AGE FROM PLAYER");
ResultSet Recordset2 = StatementRecordset2.executeQuery();
boolean Recordset2_isEmpty = !Recordset2.next();
boolean Recordset2_hasData = !Recordset2_isEmpty;
Object Recordset2_data;
int Recordset2_numRows = 0;
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<p>
<select name="select2">
<option value="Canada">Canada</font></option>
<option value="France">France</font></option>
<option value="French Guiana">French Guiana</font></option>
<option value="French Polynesia">French Polynesia</font></option>
<option value="French Southern Territories">French Southern Territories</font></option>
<option value="Germany">Germany</font></option>
<option value="United Kingdom">United Kingdom</font></option>
<option value="United States">United States</font></option>
</select>
</p>
<p>
<select name="select">
<%
while (Recordset1_hasData) {
%>
<option value="<%=(((Recordset1_data = Recordset1.getObject("COUNTRY"))==null || Recordset1.wasNull())?"":Recordset1_data)%>" ><%=(((Recordset1_data =
Recordset1.getObject("STATE_NAME"))==null || Recordset1.wasNull())?"":Recordset1_data)%></option>
<%
Recordset1_hasData = Recordset1.next();
Recordset1.close();
Recordset1 = StatementRecordset1.executeQuery();
Recordset1_hasData = Recordset1.next();
Recordset1_isEmpty = !Recordset1_hasData;
%>
</select>
</p>
<p>
//Here's where things go awry
<select name="select4">
<%
while (Recordset2_hasData) {
%>
<option value="<%=(((Recordset2_data = Recordset2.getObject("FIRSTNAME"))==null || Recordset2.wasNull())?"":Recordset2_data)%>" ><%=(((Recordset2_data = Recordset2.getObject("FIRSTNAME"))==null || Recordset2.wasNull())?"":Recordset2_data)%></option>
<%
Recordset2_hasData = Recordset2.next();
Recordset2.close();
Recordset2 = StatementRecordset2.executeQuery();
Recordset2_hasData = Recordset2.next();
Recordset2_isEmpty = !Recordset2_hasData;
%>
</select>
</p>
<p>
<select name="select5">
</select>
</p>
<p> </p>
</form>
<form name="form2" method="post" action="">
<select name="select3">
</select>
</form>
<p> </p>
</body>
</html>
<%
Recordset1.close();
ConnRecordset1.close();
%>
<%
Recordset2.close();
ConnRecordset2.close();
%>

Similar Messages

  • How can I enable the automated drop down for the subject line on the email page

    How can I enable the automated drop down for the subject line on the email page as I send more than 300 emails everyday with the same subject line. Before it use to happen in my gmail account but now its not. Please help me as its increasing my work time because I have to type the subject line again and again on each email I send. Please help me guys.

    This is usually caused by one or more bookmarks having a long title.
    You can check that folder in the Library and shorten long names.
    * Bookmarks > Show Al Bookmarks
    *Bug 626066 - History, Bookmarks menus too wide because of pages with long titles on 64bits
    <i>Please do not comment in bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html</i>

  • 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

  • WAD - How to Minimize the Space Between Drop-Down Box and Table

    Hi all,
      I am trying to display a query in 'Table' with Web Application Designer (WAD). First, I have placed the 'Drop-down box' web-item and 'Table' web-item below it in the Web Template. There is an half-inch of space between the 'Drop-down box' and the 'Table' when it displays on the browser. It doesn't look good with this gap.
      How can I eliminate or minimize this gap, PLEASE ?.
    Thanks.

    Hi Ingo & Hari,
       Thanks a lot for your help. Now it reduced the gap between the drop-down box and table to 3mm on browser.
    But, there is no gap on web template. If we change some settings, we could still further reduce the gap while displaying it on browser.
      Any new suggestions, PLEASE.  Thanks again.
    <!--BW HTML data source object tags: -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="TESTWBOLAPQUERYUSER1"/>
             TEMPLATE PROPERTIES
    </object>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_DATA_PROVIDER"/>
             <param name="NAME" value="DATAPROVIDER_1"/>
             <param name="QUERY" value="Z_BWSTAT_OLAP_PER_QUERY_USER"/>
             <param name="INFOCUBE" value="0BWTC_C10"/>
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <html>
      <head>
        <title>BW Web Application</title>
        <link href="/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
      </head>
      <body>
    <P align=left>
    <TABLE cellSpacing=1 cellPadding=1 width="75%" border=0>
      <TR>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="69"/>
             <param name="IOBJNM" value="0TCTUSERNM"/>
             ITEM:            DROPDOWNBOX_1
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_2"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="19"/>
             <param name="IOBJNM" value="0TCTIFCUBE"/>
             <param name="MAXVALUES" value="1"/>
             ITEM:            DROPDOWNBOX_2
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_3"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="34"/>
             <param name="IOBJNM" value="0CALDAY"/>
             ITEM:            DROPDOWNBOX_3
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_4"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="22"/>
             <param name="IOBJNM" value="0TCTQUERY"/>
             ITEM:            DROPDOWNBOX_4
    </object></TD></TR></TABLE>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TABLE_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="WIDTH" value="505"/>
             <param name="BORDER_STYLE" value="FORM"/>
             <param name="ALT_STYLES" value=""/>
             ITEM:            TABLE_1
    </object></P>
    <P align=left> </P>
    <P align=left> </P><FONT color=#0000ff size=2>
    <P align=center></FONT> </P>
    <P align=center> </P>
    <P align=center> </P>
      </body>
    </html>

  • How to set default value for drop down box in jsf

    Hi,
    Can anyone help me to set the default value in drop down box using <af:selectManyChoice> ?
    As I know there is an unselectedLabel attribute in <af:selectOneChoice> but not valid attribute for <af:selectManyChoice>.
    Any help must be appreciated.
    Regards,
    AK

    Hi Frank
    My entity type is a List in managed bean. I have set the entityType in the constructor of the managed bean. I have attached my code here.
    TPSearchCriteriaBean.java****************************************
    /** Constructor */
    public TPSearchCriteriaBean() {
    super();
    entityType=new ArrayList<String>();
    entityType.add(UIConstants.LIST_ITEM_ALL);
    authorizationType=new ArrayList<String>();
    authorizationType.add(UIConstants.LIST_ITEM_ALL);
    companyType=new ArrayList<String>();
    companyType.add(UIConstants.LIST_ITEM_ALL);
    mrgStatus=new ArrayList<String>();
    mrgStatus.add(UIConstants.LIST_ITEM_ALL);
    legalStatus=new ArrayList<String>();
    setEntityType(entityType);
    setAuthorizationType(authorizationType);
    setCompanyType(companyType);
    setMrgStatus(mrgStatus);
    country = "0";
    //address = new AddressBean();
    UIConstants.java***********************************************************
    public static final String LIST_ITEM_DEFAULT = "select";
    public static final String LIST_ITEM_ALL = "0";
    LOVManager.java*****************************************************************
    public List<SelectItem> getLovList(String lovType, boolean requiredOption_SELECT, boolean requiredOption_ALL)
    log.debug("LOV loading for " + lovType + ": START");
    List<SelectItem> lovList = new ArrayList<SelectItem>();
    //check validity of lov loading request
    validLov:
    for (int i = 0; i < lovTypeArray.length; i++)
    if (lovTypeArray.equals(lovType))
    break validLov;
    log.debug("ERROR: LOV Type not valid.");
    return lovList;
    //First select is replaced by ALL here
    //<-- Select --> should be an option
    if (requiredOption_SELECT)
    lovList.add(new SelectItem(UIConstants.LIST_ITEM_DEFAULT, "--Select--"));
    LOVDao dao = new LOVDao();
    dao.loadLOVValues(lovType, lovList);
    log.debug("LOV Loading successful!");
    //<ALL> should be an option
    if (requiredOption_ALL)
    lovList.add(new SelectItem( UIConstants.LIST_ITEM_ALL, "ALL"));
    return lovList;
    Kindly help me.
    Regards,
    AK

  • How to make choices in a drop down box change a value in another box

    Hi,  I am fairly new to the world of creating forms in Adobe so please bear with my question if it seems simple.  I have seen where a lot of people are using code and I am very confused.  I am creating an order form and have created a drop down box (combo box).  There are 4 choices in this drop down box.  When the user chooses one of these choices, I would like an amount to appear in a seperate box.  Each choice would have a different amount.  Is this possible?  If so, could someone please give me step by step instructions.  I appreciate any help given!!

    Yes, the best way would be to set your 'Amount' value into the 'Export Value' for each item in the combobox. Then, you can set the calculation for your text field to the following (Be sure to change "ComboBox1" to the name of your combobox):
    var f = this.getField("ComboBox1");
        var a = f.currentValueIndices;
        var s
        if (typeof a == "number") {// a single selection
            s = (f.value);       
    event.value =  s

  • How do I create hyperlinks in drop-down box....  (see details)

    I'm creating a form that will be used as an employee performance review.  On page one of the form, I'd like to insert a drop-down box titled "JOB TITLE" and there will be approx 10 different job titles in the list that the VP can select from.  Depending on the job title that the VP selects, I'd like a hyperlink that takes him to a new page within the pdf document.
    For example, the VP is going to complete a performance review for a "General Mgr" on his/her team.  He selects "General Mgr" from the drop down list in the "Job Title" box, and when he does, a new page opens that has questions related to the job responsibilities of a "General Mgr".  If the VP had selected a different Job Title, such as "Area Mgr", then a different page would have opened up with questions related to the job of an Area Mgr, which would be different than a Gen Mgr.
    Can anyone assist me with this?

    Hi,
    Here are some resources that you might find helpful:
    http://www.adobe.com/go/learn_lc_scriptingBasics
    http://www.adobe.com/go/learn_lc_scriptingReference
    http://www.adobe.com/go/learn_lc_formCalc
    http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_M odel_Refer ence.pdf
    http://www.adobe.com/devnet/acrobat/pdfs/lc_migrating_acrobat_xmlform. pdf
    And a very handy resource (and while it is for version 6 it is still very good because of the way it is laid out):http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
    The help file also helps with syntax and LC Designer comes with templates/examples.
    Lastly, check out the Developer's Network on http://www.adobe.com/devnet/livecycle/
    In the sample the script is in the exit event of the dropdown. You can view the script by selecting the dropdown, which is on the Master Page and viewing the script editor at the top of the workspace. If the script editor is not open, you can open it from the Windows menu. By default it is only one line high, so I would recommend dragging the bottom bar so that you see a good few lines. You can view different events in the script editor and set the language.
    Also if you look at the dropdown you can see in the Object > Field tab that I have set the values that are displayed in the dropdown and in the Object > Bindings I have not specified bound values, so I can use the display values in the script.
    In the hierarchy I have named each of the pages with a unique name (eg appendixAdmin), that is also used in the script.
    I hope that helps,
    Niall

  • How to populate data in drop down box dynamically in adobe form?

    Dear Experts.
    I am new to adobe interactive form can anybody please tell me how to fill data in a drop down box dynamically? I am using webservices method.
    Thanks in advance.
    Chitta Ranjan Mahato
    Edited by: mahato123 on Aug 5, 2011 12:16 PM

    you can create a method to populate the context attribute that you are using to map to your dropdown box.
    DATA: node_info TYPE REF TO if_wd_context_node_info.
    DATA: it_table TYPE wdr_context_attr_value_list.
    ** select your dropdown data into it_table and pass it to your context attribute.
    ** here, mine is call PROJ_TYPE - the values should appear in your dropdown.
      node_info->set_attribute_value_set(
         name      = 'PROJ_TYPE'
         value_set = it_table ).

  • How to get values from a multiple drop-down box.

    On my first page, I have a multiple drop-down box as the following code.
    <select name="selInterMethod" class="textbox" multiple>
    <option selected value="CH">Chicago</option>
    <option value="NY">New York</option>
    <option value="SF">San Francisco</option>
    </select>
    On my second transaction page, I need to save "CH-NY" into my Database column: city if the user selected Chicago and New York.
    How can I accomplish this in JSP?
    Thanks for your help.

    I figured out the solution. Here it is. FYI
    String inter_method = "";
    String Inter_Method[]=request.getParameterValues("selInterMethod");
         if( Inter_Method.length > 0 ) {
              for (int i = 0; i < Inter_Method.length; i++) {
                   inter_method = inter_method + '-' +Inter_Method;
              inter_method = inter_method.substring(1,inter_method.length());
              System.out.println("trx inter_method = " + inter_method);

  • This is my first use of this program. How do I remove a page break? How do line up my drop down box along side the text box on the left of it? The drop down is for a multiple choice answer for the question to the left.

    This is my first use of this program. How do I remove a page break? How do line up my drop down box along side the text box on the left of it? The drop down is for a multiple choice answer for the question to the left of each drop down.

    See McAfee support to find out how to disable that McAfee feature - that isn't part of the normal Firefox installation.

  • How to create Dynamic Drop down list ?

    Hi experts
    I want to create a Dynamic Drop down list that should be an Editable,after editing that i need to save.
    thanks,
    vikram.c.

    Hello,
    Please go through this link:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/linking%2bdrop-down%2blists
    If useful reward.
    Vasanth

  • Create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box

    HELP!!! Can anyone please provide some guidance on how to create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box.
    I have a form which – based on the department that's selected from a drop-down box – will have different form fields/text boxes, etc, made available.
    Is this possible in LiveCycle, if so, can you please provide the script/info - as needed.
    Thanks,

    In the preOpen event of the second dropdown list you put something like (in formCalc):
    if (dropdown1 == 1) then
    $.clearItems()
    $.setItems("Year, 2 Year,  3 Year")
    elseif (dropdown1 == 2) then
    $.clearItems()
    $.setItems("3 Year,  4 Year")
    endif

  • How do I use Javascript to populate a text field based on a selection from a drop down box?

    Greetings,
    I have virtually no experience with JavaScript and I am trying to figure out how to add some basic automation features to an Adobe form.  I have a drop down box called "Hospital_Name" that will contain approximately 7 possible selections.  When the user makes a selection, I would like to have the text field (called "Hospital_Address") below the drop down box populate with the corresponding address for the selection.  I have the "Hospital_Address" text field configured for multiple lines and would like the address to have a line break between the street address and the city/state/zip.
    For example, if the user selected "Hospital 1", the text field would display:
    123 Main St
    Anytown, CA 12345
    Any help or examples you can provide would be greatly appreciated.

    You have the element names within the object within brackets.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    // some debugging code to see location names;
    console.show();console.clear():
    for(I in Location) {
    console.println(I);
    // end debugging code;
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;
    This is not a beginners task but requires a fair amount of knowledge about the structure of objects, defining strings, and structure of arrays.
    Are you sure you have all the field names correctly spelled and capitalized?
    Do you get any error in the JavaScript console?
    Just trying the line that defines the "Location", I get the following error:
    SyntaxError: invalid property id
    1:Console:Exec
    undefined
    All the form field in a PDF are processed by using JavaScript and any error in any script will stop JavaScript processing.
    It might help to have a link to the problem form.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;

  • How to get "tones" tab  in drop down menu

    how to get "tones" tab  in drop down menu

    I assume that you are referring to the categories on your iTunes library (?), if you are then go into Edit > Preferences and on the General tab make sure that Tones is ticked
    You can also enable the left-hand sidebar on iTunes 11 on a PC via control-S, which then allows you to view the sections of your library (those enabled in Preferences) via that sidebar, and if you have iOS devices they will also show on that sidebar when connected.

  • How to create a multi select drop down filed in crm 7.0

    Hi All,
            I need to create a multi select drop down field in crm web ui where one field have 7 value and we can select more than one value at a time.I have no idea how to create a multi select drop down field in web ui.
    Please help.....

    Hi vishwas
    Please follow the thread where a similar requirement was posted.
    Re: Drop-down list box / pick-list with multiple selections at a time
    Here the suggestions say that a workaround could be to associate a table view to the field.
    Regards,
    Nisha

Maybe you are looking for