Jump menu from database

I’m trying to create a “jump menu” from a
database table.
I’ve created the jump menu by using a "List/Menu" and a
"Dynamic" connection, this displays the items correctly.
Next I’ve used “Go To URL” and set the
parameters for the page load to use the value of the List/Menu to
load the required webpage and oppropriate value.
The page loads however it doesn’t show (or use) the
value from the List/Menu
Any ideas?
Heres my code
<select name="selPRINT" id="selPRINT"
onChange="MM_goToURL('parent','conPROD.asp?REF=<%=cStr(Request.Form("selPRINT"))%>');retu rn
document.MM_returnValue">
<option value="">Select your printer...</option>
<%
While (NOT rsPRODUCT.EOF)
%>
<option
value="<%=(rsPRODUCT.Fields.Item("printDELLref").Value)%>"><%=(rsPRODUCT.Fields.Item("pri ntPRODUCT").Value)%></option>
<%
rsPRODUCT.MoveNext()
Wend
If (rsPRODUCT.CursorType > 0) Then
rsPRODUCT.MoveFirst
Else
rsPRODUCT.Requery
End If
%>
</select>

I have the answer.
First I created a list/menu and associated my database item
to it.
Next I created a jump-menu.
I then used the database code from the list/menu and inserted
it into the jump-menu.
Finally I added the option value of the page I wanted to
load.
Here’s my final code…
<select name="jumpMenu" class="SmallBLACK" id="jumpMenu"
onChange="MM_jumpMenu('parent',this,0)">
<option
value="conPROD.asp?REF=<%=(rsP.Fields.Item("printDELLref").Value)%>">Select
your printer....</option>
<%
While (NOT rsP.EOF)
%>
<option
value="conPRINTdetail.asp?REF=<%=(rsP.Fields.Item("printDELLref").Value)%>"><%=(rsP.Field s.Item("printPRODUCT").Value)%></option>
<%
rsP.MoveNext()
Wend
If (rsP.CursorType > 0) Then
rsP.MoveFirst
Else
rsP.Requery
End If
%>
</select>

Similar Messages

  • ADF Menu from Database

    Greetings to all !
    I need to create an ADF menu with Tabs in first level, and menu bar at second level, but i don't need to write all the code in a managed bean at the faces-config.xml, instead of that, i need to define a managed bean that go to the Database and build the menu with your childrens dynamically from the database, performing querys according with the current user connected to the application.
    Have any ideas ?
    Thanks in advance,
    Pipa

    Hi,
    the principle is the same. You use the same approach but don't build the structure from managed properties. You access the database ideally through methods exposed on the business service
    Frank

  • I cannot locate the Jump Menu under Insert/Form. I am looking for a way to replacve the Spry menu I used previously

    I need to modify my website and I used a Spry menu to direct users to specific pages. This is no longer supported with the 2014 version and thought a Jump Menu would work, but it is not on the insert/form menu as instructed in help files. Any ideas?

    Jump Menus still exist in CC, they're just created differently than they used to be. For some reason I can't figure out, they've been a bit buried...
    1. Click in Design View where you want the Select Menu to appear
    2. Go to Insert > Form > Select
    3. Click on the Select Menu created in Design View
    4. Click the + in the Behaviors Window and choose Jump Menu
    From there, you should get the familiar Jump Menu dialogue box.

  • Cacheing /storing form data from mulitple pages selected from a jump menu

    What is the best way or is it even possible to cache /store
    info through a series of pages (9 randomly selected from a jump
    menu) until the user is done with commenting and is ready to submit
    the form.
    We are trying some PHP but not very successfully and the
    timeline is of course jammed..and this is what the client is
    requesting. There is a wireframe of the site dummied up here:
    http://www.neo.cat.nebraska.gov/mock_ups/overview.php
    log: neou$er
    pass: !neoc@t
    The intent is that the user will complete this survey by
    selecting only the ones they want to comment on and then when they
    have completed all the care to they can be done with the survey and
    hit submit and it will be sent to the staff member designated to
    compile the data.
    Any suggestions would be very helpful at this time..
    Thanks

    This is known as a cascading or dependent dropdown. The problem is that the web page needs to be sent to the browser before anyone can make a selection from the first dropdown. To get the dependent value, another request needs to be sent to the server. You can do this with Ajax.
    For example, jQuery makes it relatively simple to work with Ajax. The value selected from the first dropdown is sent in the background as a request to a dedicated script that selects the matching values from the database. Normally, Ajax uses the GET method, so your SQL query would use the $_GET variable to filter the results and send them back to populate the dependent dropdown.
    Dreamweaver cannot do it out of the box. You need to script it all yourself.

  • Jump Menu/Database question

    Greetings all. I have a contact management database for
    different departments. As it stand right now, I have a one page on
    my site with a list of each department, and when you click on a
    department it takes you to a webpage that populates with
    information pertaining to the selected department. What I'm trying
    to do is replace the list with a jump menu. I know how to populate
    the jump menu with dynamic data, but how do I pass a URL variable?
    Also, I'm wanting the site to go to the same page regardless of
    which department the select. How do I tell the jump menu to go to
    page x if the labels are pulled dynamically from a table? The best
    example I can think of is a webpage with that caters to different
    countries. REgardless of which country you select it takes you to
    the same page, but the data on the page is pulled from a database
    containing the language that corresponds with the selected country.
    Thank you in advance for the help.

    Moved to the Dreamweaver Application Development forum.
    To display the selected option, you need to add a conditional statement to each <option> tag.
    <option style="background-image:url(img/flags/icon1.gif);"
    value= "main.php?city=tx"
    <?php
    if (isset($_GET['city'] && $_GET['city'] == 'tx') {
      echo 'selected="selected"';
    ?>
    >Texas</option>
    Do the same for each <option>, changing 'tx' to 'ut', 'ny', and 'nj' as appropriate.

  • Dynamic Drop Down Menu from an Access Database

    Hello Everyone,
    I am user Adobe Designer 7 to create a fillable PDF, and I would like to get the options for a drop down menu from my MS Access database. Basically I would like to populate the drop down menu with the names in the Access database. There i Have a table called PhoneNumbers and it contains the names of all the people I want to appear in the drop down menu that I just created.
    This is what I did:
    I created a drop down menu and then I clicked on Object > Binding > under "Default Binding (Open, Save, Submit)" choose "New Data Connection"
    then connect to the database using a fileDSN. I opened the table where with the "names" column (PhoneNumbers)
    and under the "Query," option, I wrote:
    select * from PhoneNumbers
    Then it gave me all the fields from the table and I dragged the "Last name" field over the drop down menu. I will need to find a way to get the "First Name" field to join the Last Name field to create one name that looks like this: Hill, Angie
    The problem is that even though it shows the name from the Access database, it does not give me a list of all the names when I open the form in Reader 7...
    No matter how much I click that drop down arrow, the name does not change...
    It's almost as if it gets to the databse and gets the data from the database, but it cannot loop through it...
    It's almost as if it's missing the code to loop through it...
    Why is this? Any ideas how to fix it so it gives me a list of ALL the names, when I click on the drop down button?
    After that, how can I add the first name to it?
    The form would look like this:
    Angie H. 202 641 2055
    Right now it does look like that, but I cannot change to another name when I click the drop down menu. For the code to be working when I change to another name, the phone number also changes to the phone number of that person:
    Barry S. 703 555 1258
    The name is in a drop down menu, the phone number is in a textbox.
    Can you help me with this?

    ANGELA,<br /><br />Well, the good new is that you are not far off...What you need is to insert the following code using Java Script under the Initialize function.  Just replace the Connection name,  The Hidden Value, and the Display Text with your information.  This is a function is 8.0 but will work with 7.0<br /><br />/*     This dropdown list object will populate two columns with data from a data connection.<br /><br />     sDataConnectionName - name of the data connection to get the data from.  Note the data connection will appear in the Data View.<br />     sColHiddenValue      - this is the hidden value column of the dropdown.  Specify the table column name used for populating.<br />     sColDisplayText          - this is the display text column of the dropdown.  Specify the table column name used for populating.<br /><br />     These variables must be assigned for this script to run correctly.  Replace <value> with the correct value.<br />*/     <br /><br />var sDataConnectionName = "DataConnection";     //     example - var sDataConnectionName = "MyDataConnection";<br />var sColHiddenValue = "CAT_Corp_SeqNo";               //     example - var sColHiddenValue = "MyIndexValue";<br />var sColDisplayText = "CAT_Corporate";               //     example - var sColDisplayText = "MyDescription"<br /><br />//     Search for sourceSet node which matchs the DataConnection name<br />var nIndex = 0;<br />while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br /><br />var oDB = xfa.sourceSet.nodes.item(nIndex);<br />oDB.open();<br />oDB.first();<br /><br />//     Search node with the class name "command"<br />var nDBIndex = 0;<br />while(oDB.nodes.item(nDBIndex).className != "command")<br />     {<br />          nDBIndex++;<br />     }<br /><br />//     Backup the original settings before assigning BOF and EOF to stay<br />var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");<br />var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");<br /><br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF", "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF", "eofAction");<br /><br />//     Clear the list<br />this.clearItems();<br /><br />//     Search for the record node with the matching Data Connection name<br />nIndex = 0;<br />while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)<br />     {<br />          nIndex++;<br />     }<br />var oRecord = xfa.record.nodes.item(nIndex);<br /><br />//     Find the value node<br />var oValueNode = null;<br />var oTextNode = null;<br />for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)<br />     {<br />          if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)<br />          {<br />               oValueNode = oRecord.nodes.item(nColIndex);<br />          }<br />          else if(oRecord.nodes.item(nColIndex).name == sColDisplayText)<br />     {<br />          oTextNode = oRecord.nodes.item(nColIndex);<br />     }<br />}<br /><br />while(!oDB.isEOF())<br />{<br />      this.addItem(oTextNode.value, oValueNode.value);<br />       oDB.next();<br />}<br /><br />//     Restore the original settings<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup, "bofAction");<br />oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup, "eofAction");<br /><br />//     Close connection<br />oDB.close();

  • How to set jump to menu from playing video?

    I tried to set jump to menu (specific menu) from playing video. Suppose I select selection 2 number 4 then it play then I realize that I don't want to see that video I click menu and go back to same selection 2 menu. I could not get it right. Not only selection 2. If I play from selection 1 number 2 video then click menu button then it go to selection 1 menu. How do I do that?

    Select the video track and in the inspector set the remote menu button destination.
    o| TOnyTOny |o

  • Populating drop down menu's from database dynamically

    Hi
    I m facing a problem of populating the drop down menu from a MS Access database using JSP. But i m not able to do it. Can you please help me out?
    this works perfectly for textarea
    <textarea cols="20" rows="20">
    <% for(int i =1; i <=rsmd.getColumnCount();++i)
    out.println(rsmd.getColumnName(i)); %>
    </textarea>
    but for drop down box it gives problems
    Heres the code!
    <select name="aa" ID = "aa">
    <option value="<% for(int i =1; i <= rsmd.getColumnCount();++i)
    out.println(rsmd.getColumnName(i)); %>" > </option>
    </select>
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 61 in the jsp file: /gv/event.jsp
    Generated servlet error:
    i cannot be resolved
    wat can be the alternative? Please hlp
    Regards
    Sami

    Hi i m facing a problem in jsp while filling the dropdown box<select name="combosubject"  width="10%" maxlength="20"/>
                                  <option ></option>
                                  <%
                                                System.out.println("1st time");
                                                rs=stmt.executeQuery("select subject.name from subject order by name");
                                                while(rs.next())
                                                  subject = rs.getString(1);
                                             %>     
                                             <option ><%=subject%></option>
                                             <%
                             rs.close();
                             stmt.close();
                       %>the problem is that when i execute this code for the first time it works fine and after that it keeps on throwing exception like "No data found", "Column not found"
    on <form> action i have recalled this function that is when i click the search button this page is executed again and at this moment i got the exception

  • How to setup a dynamic jump menu field

    I attempted to setup a normal drop down with a button to
    excute the values,
    but that doesnt seem to work very well... even though the
    database has the
    correct links within the tables, regardless of what selection
    you make you
    are taken to the same page all the time.
    Is there a way to use the jump menu dynamically? I want the
    menu to be
    populated from my table, i dont want to have to manually
    build the menu....
    When i try to use it, it doesnt have the dynamic radio button
    to chose a
    recordset.. its all manual entry

    Man that took a long time to come back with?
    But this should work for you.
    Add a standard List Box to your page. Click 'List Values' in
    your Property
    inspector at the bottom of the page. Click the 'lightning
    bolt' to add the
    labels that you want to display from your recordset, and then
    click the
    'lightning bolt' in the values column. Choose the recordset
    and the field
    that contains the ID you want to pass to the detail page. Now
    click ok, and
    Dreamweaver will have put some code in the value column for
    you. You need
    to add a
    prefix to this that will tell it what page and the name of
    the URL parameter
    you want to pass.
    ie
    mydetailpage.asp?ID=<%=the code Dreamweaver Created%>
    Ok so you now have the correct values in the list box.
    Now open up a second page, and add a Jump Menu to it. Just
    add one item
    containing anything.
    Go to the code view and copy into the clipboard the
    JavaScript code that
    Dreamweaver created to make the JumpMenu work. Make sure that
    you get
    everything
    including the <script> tags.
    <script language="JavaScript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
    some more code here!!!
    //-->
    </script>
    Paste this into a similar place on your other document. (just
    above the
    </head> tag).
    All you need to do now is modify the List Menu you created to
    use the Jump
    Menu code.
    You will have something that says:
    <select name="select">
    Change this to:
    <select name="select"
    onChange="MM_jumpMenu('parent',this,0)">
    That should do it!!!
    Dave
    "Daniel" <[email protected]> wrote in message
    news:[email protected]...
    > DWMX / ASP / SQL
    >
    >
    > "Baxter" <baxter(remove:-)@gtlakes.com> wrote in
    message
    > news:[email protected]...
    > > What server language are you using?
    > > Dave
    > > "Daniel" <[email protected]> wrote in
    message
    > > news:[email protected]...
    > >> I attempted to setup a normal drop down with a
    button to excute the
    > > values,
    > >> but that doesnt seem to work very well... even
    though the database has
    > >> the
    > >> correct links within the tables, regardless of
    what selection you make
    > >> you
    > >> are taken to the same page all the time.
    > >>
    > >> Is there a way to use the jump menu
    dynamically? I want the menu to be
    > >> populated from my table, i dont want to have to
    manually build the
    > > menu....
    > >>
    > >> When i try to use it, it doesnt have the
    dynamic radio button to chose
    a
    > >> recordset.. its all manual entry
    > >>
    > >>
    > >
    > >
    >
    >

  • Jump menu to another jump menu

    I am hoping I can get help...My boss wants a jump menu on the
    left with sections and when one selects a section have it go to
    another jump menu on the right with all of the selections in that
    section category. I have seen this done with jump menus that once
    an item is selected, give a special group of selections pertaining
    only to that item.
    I would love to be able to do this, but I remain clueless!

    This "behaviour" is usually called "dependant dropdown menu"
    BTW.
    Case 1: if the values of both menus will be derived from a
    database, there are some DW extensions available like
    Tecnorama´s
    "Dynamic Dependant Dropdown Menus"
    Case 2: if you´ll need to use static values for both
    menus
    (ie no database), you may want to give
    Kaosweaver´s
    "Dropdown Menu/List Rewrite" extension a try.

  • Dynamic Jump Menu???

    I am trying to create a dynamic jump menu (populated from a database). I have a column in th DB named "url" that contains the path of the page of each option. Any ideas on how to make it so that when the option is selected and the "go" button is pushed it takes the user to the page specified in the "url" of the database? Any help is greatley appriciated.

    "kevinrogers2006" <[email protected]> wrote
    in message
    news:go4va9$lr2$[email protected]..
    > when i click the
    > button to jump to page the .php is missing therefore i
    get page
    > cannot be
    > found.
    It's missing because it's not in the code. The problem lies
    here:
    > <option value="<?php echo
    $row_menuselect['ID']?>"<?php if
    > (!(strcmp($row_menuselect['ID'],".php"))) {echo
    > "selected=\"selected\"";}
    > ?>><?php echo
    $row_menuselect['Name']?></option>
    Change it like this:
    <option value="<?php echo $row_menuselect['ID'] .
    '.php'?>">
    <?php echo $row_menuselect['Name']?></option>
    David Powers
    Adobe Community Expert, Dreamweaver
    http://foundationphp.com

  • [Help]Help with Jump Menu

    Hi there,
         I wanna make an inserting form , like that
    Name:
    E-mail:
    Location: (list menu : US, UK, ARE, UAI, Else) if the user choosed "Else" Show a text field to type his location ,
    when I tried "Jump Menu" it reset fields for sure , so is there any pro way ??
    Thanks.

    The problem you are experiencing here is that you have selected the wrong type of menu item for your form.  There are 2 types of drop-downs that Dreamweaver can create in a form.  There is a list/form and jump menu. The jump menu is used so that once an item is selected from this menu you are redirected to another page or website, or if this is undefined it simply refreshes the page you are on.  This is not what you want.  When you select this, look at the item right next to it in the menu and you will see a List/Menu.  This is the type of drop-down you want when someone is filling out a field in a form that will be submitted to an email/database.

  • Fetching values from database into a drop down box

    in my JSP page there are 3 drop down boxes for date of birth......
    what i need is i want to get the values from database into that drop down box when i access the JSP page.......
    session is there....'m getting all other values.......
    I will attach the JSP page.....
    Please help me...........
    Thanks in Advance......
    <%@ taglib uri='/WEB-INF/taglib/struts-bean.tld' prefix='bean'%>
    <%@ taglib uri='/WEB-INF/taglib/struts-logic.tld' prefix='logic'%>
    <%@ taglib uri='/WEB-INF/taglib/dyna.tld' prefix='dyna'%>
    <%@ taglib uri='/WEB-INF/taglib/struts-html.tld' prefix='html'%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title><bean:message key="page_title"/></title>
    <link href="<bean:message key="context"/>/CSS/default.css" rel="stylesheet" type="text/css" />
    <script src="<bean:message key="context"/>/js/AC_RunActiveContent.js" type="text/javascript"></script>
    <link href="<bean:message key="context"/>/CSS/screen.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <%!
    Membership mShip = null;
    %>
    <script language="javascript" >
    function checkDate(Form){
    var d;
    d = Form.year.value+"-"+Form.month.value+"-"+Form.day.value;
    alert("Date is:"+d);
    Form.dob.value = d;
    </script>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
         <jsp:include flush="true" page="../templates/header.jsp"/>     </td>
    </tr>
    <tr>
    <td class="menuTD">     
         <jsp:include flush="true" page="../templates/menu.jsp"/>     </td>
    </tr>
    <tr>
    <td class="sub_menuTR"> </td>
    </tr>
    <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td class="column" valign="top" width="170"><jsp:include flush="true" page="../templates/left_panel.jsp"/></td>
    <td valign="top" align="left">
              <dyna:message error="error" warning="warning" message="message"/>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="80%" valign="top" align="left">
                   <%
                   if(session != null){
                   mShip = (Membership)session.getAttribute("member");
                   %>
                        <form action="updateContactDetails.dy" method="post" name="form1">
                        <input type="hidden" name="m" value="<%=request.getParameter("m")%>" />
                             <table width="100%" border="0">
                             <tr>
                                  <td>First Name</td>
                                  <td><input name="first_name" type="text" id= "first_name" value = "<bean:write name = "member" property = "first_name" />" /></td>
                             </tr>
                             <tr>
                                  <td>Last Name </td>
                                  <td><input name="last_name" type="text" id="last_name" value = "<bean:write name = "member" property = "last_name" />" > </td>
                             </tr>
                             <tr>
                                  <td>Address</td>
                                  <td><input name="address1" type="text" id="address1" value = "<bean:write name = "member" property = "address1" />" ></td>
                             </tr>
                             <tr>
                                  <td> </td>
                                  <td><input name="address2" type="text" id="address2" value = "<bean:write name = "member" property = "address2" />" ></td>
                             </tr>
                             <tr>
                                  <td>Suburb/City </td>
                                  <td><input name="city" type="text" id="city" value= "<bean:write name = "member" property = "city" />" ></td>
                             </tr>
                             <tr>
                                  <td>State/Territory</td>
                                  <td><input type="text" name="state" value = "<bean:write name = "member" property = "state" />" ></td>
                             </tr>
                             <tr>
                                  <td>Postcode</td>
                                  <td><input type="text" name="postcode" value = "<bean:write name = "member" property = "postcode" />" ></td>
                             </tr>
                             <tr>
                                  <td>Contact Phone</td>
                                  <td><input type="text" name="home_phone" value = "<bean:write name = "member" property = "home_phone" />" ></td>
                             </tr>
                             <tr>
                                  <td>Mobile</td>
                                  <td><input type="text" name="mobile" value = "<bean:write name = "member" property = "mobile" />" ></td>
                             </tr>
                             <tr>
                                  <td>Date of birth</td>
                                  <td nowrap="nowrap"><select name="day">
    <option>Day</option>
    <option value="01">1</option>
    <option value="02">2</option>
    <option value="03">3</option>
    <option value="04">4</option>
    <option value="05">5</option>
    <option value="06">6</option>
    <option value="07">7</option>
    <option value="08">8</option>
    <option value="09">9</option>
    <option value="10">10</option>
    <option value="11">11</option>
    <option value="12">12</option>
    <option value="13">13</option>
    <option value="14">14</option>
    <option value="15">15</option>
    <option value="16">16</option>
    <option value="17">17</option>
    <option value="18">18</option>
    <option value="19">19</option>
    <option value="20">20</option>
    <option value="21">21</option>
    <option value="22">22</option>
    <option value="23">23</option>
    <option value="24">24</option>
    <option value="25">25</option>
    <option value="26">26</option>
    <option value="27">27</option>
    <option value="28">28</option>
    <option value="29">29</option>
    <option value="30">30</option>
    <option value="31">31</option>
    </select>
                                  <select name="month">
                                       <option>Month</option>
                                       <option value="01">January</option>
                                       <option value="02">February</option>
                                       <option value="03">March</option>
                                       <option value="04">April</option>
                                       <option value="05">May</option>
                                       <option value="06">June</option>
                                       <option value="07">July</option>
                                       <option value="08">August</option>
                                       <option value="09">September</option>
                                       <option value="10">October</option>
                                       <option value="11">November</option>
                                       <option value="12">Decembber</option>
                                  </select>
                                       <select name="year" onChange = "checkDate(this.form);" >
                                       <option>Year</option>
                                       <option value="1957">1957</option>
                                       <option value="1956">1956</option>
                                       <option value="1955">1955</option>
                                       <option value="1954">1954</option>
                                       <option value="1955">1955</option>
                                       <option value="1956">1956</option>
                                       <option value="1957">1957</option>
                                       <option value="1958">1958</option>
                                       <option value="1959">1959</option>
                                       <option value="1960">1960</option>
                                       <option value="1961">1961</option>
                                       <option value="1962">1962</option>
                                       <option value="1963">1963</option>
                                       <option value="1964">1964</option>
                                       <option value="1965">1965</option>
                                       <option value="1966">1966</option>
                                       <option value="1967">1967</option>
                                       <option value="1968">1968</option>
                                       <option value="1969">1969</option>
                                       <option value="1970">1970</option>
                                       <option value="1971">1971</option>
                                       <option value="1972">1972</option>
                                       <option value="1973">1973</option>
                                       <option value="1974">1974</option>
                                       <option value="1975">1975</option>
                                       <option value="1976">1976</option>
                                       <option value="1977">1977</option>
                                       <option value="1978">1978</option>
                                       <option value="1979">1979</option>
                                       <option value="1980">1980</option>
                                       <option value="1981">1981</option>
                                       <option value="1982">1982</option>
                                       <option value="1983">1983</option>
                                       <option value="1984">1984</option>
                                       <option value="1985">1985</option>
                                       <option value="1986">1986</option>
                                       <option value="1987">1987</option>
                                       <option value="1988">1988</option>
                                       <option value="1989">1989</option>
                                       <option value="1990">1990</option>
                                       <option value="1991">1991</option>
                                       <option value="1992">1992</option>
                                       <option value="1993">1993</option>
                                       <option value="1994">1994</option>
                                       <option value="1995">1995</option>
                                       <option value="1996">1996</option>
                                       <option value="1997">1997</option>
                                       <option value="1998">1998</option>
                                       <option value="1999">1999</option>
                                       <option value="2000">2000</option>
                                       <option value="2001">2001</option>
                                       <option value="2002">2002</option>
                                       <option value="2003">2003</option>
                                       <option value="2004">2004</option>
                                       <option value="2005">2005</option>
                                       <option value="2006">2006</option>
                                       <option value="2007">2007</option>
                             </select ></td></tr>
                             <tr>
                                  <td><input type="hidden" name = "dob" /> </td>
                                  <td nowrap="nowrap"><input type="submit" value="Submit" /></td>
                             </tr>
                             </table>
                        </form>
                   </td>
    <td width="40"></td>
    <td width="200" valign="top">
                   <div id="headlines">
    <jsp:include flush="true" page="../templates/profile.jsp"/>
    </div>
                   </td>
    </tr>
    </table>
              </td>
    <td> </td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><jsp:include flush="true" page="../templates/footer.jsp"/></td>
    </tr>
    </table>
    </body>
    </html>

    i think normally u will get data from databsae as objects.they are like java beans having getter and setter methods.so you create a collection of those objects like collect all the objects coming from database into an arraylist or....
    suppose you want to populate the dropdown box with say "username" from database object s, your code will look like that
    <html:select property="name">
    <html:options collection="databaseList" property="username" />
    </html:select>
    "databaseList" is collection(say.. ArrayList) of objects you are getting from database.this dropdown will contain all the "usernames" you are getting from database.

  • How to get data from database to JComboBox

    hi
    i am trying to get data which is in database. here the problem is i am getting only one row in the JcomboBox
    i want all data just like list. i dont know how to get that . below is the code plz any one help me....
    import javax.swing.*;
    import javax.swing.JList.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.String.*;
    import java.lang.Integer.*;
    import java.sql.*;
    public class customer_code extends JFrame implements ActionListener
    Container c=getContentPane();
    JLabel customer_code=new JLabel("Customer Code and Name");
    customer_code()
    super("Customer Details");
    setSize(300,250);
    setVisible(true);
    setLayout(null);
    setLocation(430,310);
    Font f=new Font("SansSerif",1,16);
    Font f1=new Font("SansSerif",0,14);
    customer_code.setBounds(10,20,250,30);
    add(customer_code);
    customer_code.setFont(f);
    ResultSet rs=null;
    String j=null,k=null;
    try
    System.out.println("MySQL Connect Example.");
    Statement st=null;
    Connection con=null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:project","vikky","vishu");
    System.out.println("Connected to the database");
    st=con.createStatement();
    rs=st.executeQuery(" select code as c,Customer_name as n from customer_details ");
    while(rs.next())
    j=rs.getString("c");
    k=rs.getString("n");
    System.out.println(j);
    System.out.println(k);
    String[] names = new String[] {j,k};
    JComboBox comboBox = new JComboBox(names);
    add(comboBox);
    comboBox.setBounds(25,60,250,50);
    comboBox.setFont(f);
    comboBox.addActionListener(this);
    comboBox.setMaximumRowCount(10);
    con.close();
    System.out.println("Disconnected from database");
    catch (Exception e)
    e.printStackTrace();
    public void actionPerformed(ActionEvent event)
    if ("comboBoxChanged".equals(event.getActionCommand()))
    System.out.println("User has selected an item from the combo box.");
    JComboBox comboBox = (JComboBox) event.getSource();
    if(comboBox.getSelectedItem().equals("None"))
    public static void main(String agr[])
    customer_code cd=new customer_code();
    }

    r035198x wrote:
    Also separate that database code from interface display code.
    You should never access the database on the EDT.
    See [Doing Swing Right|http://bytes.com/topic/java/insights/853297-doing-swing-right] for more details.
    Yes! By the time you are working with Swing and JDBC you should already know how to structure code. If not, then you are not ready for these topics and you've jumped the gun.

  • Jump Menu Not working

    Hello good samaritans.. I need help.. The jump menu in my web
    page is not working.
    I already tried inserting a Go button but it still didnt
    work. I have a website and I
    created a template, in this template I created dummy jumpmenu
    first just to see
    how it looks like then after creating a whole bunch of pages
    from the template I decided
    to connect all the webpages by fixing the jump menu. But now
    its not working!!!
    What I did is that in the 'when selected, go to url:' window
    I just browse the web pagefile then click ok but when I try
    to run it in the
    internet it's not working.
    Also, just for your info, I Haven;t publish it yet. Will be
    the reason why?
    I just kept all my files on my c drive.
    Thanks a lot!!

    Let me be clear -
    What is the path to the local root folder.
    Open DW's Site manager. Select the sitename. Click Edit.
    Click on the
    Advanced tab. Copy the contents of the Local root folder
    field and paste it
    into a reply.
    Now - don't make me ask you this again, or it's no supper for
    you, young
    man/lady!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "teamse" <[email protected]> wrote in
    message
    news:ebg9ss$pqd$[email protected]..
    > Thanks Gary for replying. Can you explain it a little bt
    mrore I don't
    > understand it completely..=) Yes after I finish the
    website we will then
    > publish it on a server but for now I haven''t publish it
    so it still
    > sitting on
    > my c:drive. when you say get rid of the blanks in file?
    what do you mean,
    > is it
    > when typing the ffile address in dw? because when I
    browse it and click
    > the
    > file dw automatically create a link like this"../BMB
    Webpages/Boulder
    > Webpages/B_ConferenceRooms.html"
    > and it doesnt have any balanks but it still not working
    ' or you mean to
    > say
    > when saving a webpage to my c drive? thanks
    >

Maybe you are looking for

  • Macbook Pro late 2011 Freezing when launching game

    Process:         Gone Home [671] Path:            /Volumes/VOLUME/GoneHome.app/Contents/MacOS/Gone Home Identifier:      unity.The Fullbright Company.Gone Home Version:         Unity Player version 4.1.5f1 (4.1.5f1) Code Type:       X86 (Native) Pare

  • Equipment for filming

    I coach high school basketball and am in need of a new way in videoing our games.  Last year we recorded our games on a video camera with dvd mini-tapes.  I loved the quality, but when the game was over we had to transfer that to a dvd at real time. 

  • TRM accounting configuration needed to switch from F111 to F110

    I had all TRM configuration done for working with F111. Now my customer wants to use F110 instead of F111, paying via customers instead of gl accounts. F110 was already working for FI-AP and AR. What do I have to do in TRM customizing and master data

  • Can Absorption costing transfer in COPA?

    Hi All I would appreciate your help. Please provide me details explanation over. 1) Can we transfer Absorption Costing in COPA? 2) What is the procedure? ( It is my request please use full form rather than short words).

  • RFC - XI - WebService :: Not getting complete Response from WS

    Hi I am working on a following Synchronous scenario <b>SAP R/3 --> Sender RFC Adapter --> XI --> Rec. SOAP Adapter --> MI Web Service</b> Now I tested the structure of Request/Response Message from WebService in XML Spy, & designed my Request/Respons