How can i display the value fetched from my database back onto my combo box

i have saved a selected value from my combo box in my database.
i want to display the same value on my combo box to the user on a jsp page.
Can someone help me?

<%
String valueInYourDatabase="2";
String[] valuesToDisplay={"1","2","3"};
%>
<SELECT name="square_root_of_for">
<% for(int i=0;i<valuesToDisplay.lngth;i++){
String s=valuesToDisplay;
%>
<OPTION value="<%=s%>" <%=(s.equals(valueInYourDatabase)?"SELECTED":"")%> ><%=s%></OPTION>
<%}%>
</SELECT>
Something like this...
didn't compile it so their are surely errors ;)
regards
Alban

Similar Messages

  • How can I display the HTML page from servlet which is called by an applet

    How can I display the HTML page from servlet which is called by an
    applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
    I am calling my struts action class from the applet. I want to show the response in the same browser.
    Code samples will be appreciated.

    hi
    I got one way for this .
    call a javascript in showDocument() to submit the form

  • How can i pass the value one from to another form?

    hi all
    how can i pass the value one from to another form  with out use it when ever i want to needed this value that ican useit?
    like i have two fields U_test1 and U_test2  table name @AUSR
    that i have  four form  A! , A2,A3,A4    please tell me in details....?

    Hi,
    U can assign the values to some variables and access then in ur required forms.
    Vasu Natari.

  • I have all my music on an external media drive that has crashed. How can I get the music of my ipod touch back onto the comupter without loosing the music when it syncs?

    I have all my music on an external media drive that has crashed. How can I get the music of my ipod touch back onto the comupter without loosing the music when it syncs. in order to start rebuilding my music collection?

    You should be able to recover the media with the tips in  this post from forum regular Zevoneer but I'm not sure what the implications are for your application settings. You can probably transfer your purchases into a newly authorised library, backup the device, recover any other media using third party tools, then restore the device from the backup. That should switch the assocation of the device to the new library but it is not something I've personally tested.
    When you get it all working, make a backup!
    tt2

  • How can i add the value inputted from the prompt box to the mysql database?

    Hey guyz help me pls with this problem... im only new to javascript and also to the opensource like(php and mysql). I tried to use a prompt box and store the value into the textbox. But now I want to know how to insert/add the value inputted from a prompt box directly into the database if it is possible.

    Java is not JavaScript, they've got almost nothing in common (apart from superficial syntax similarities and the first 4 letters of their names).
    If indeed your question is about JavaScript, then please find a JavaScript forum, as we can't help you here.

  • How can i display the values in the vector in a jsp using jstl

    in a task i am recieving a vector in a jsp... how can i display those vector values in the jsp using jstl.... plz help me
    thanks in advance

    <%
    here you got vector say; v
    pagecontext.setAttribute("varname",v);
    %>
    <c:forEach var="i" items="${varname}">
    <c:out value="${i}">
    </c:forEach>

  • How can I display the value of the Target Currency variable in my query

    We have a query which has a key figure set to prompt for a Target Currency at runtime.  Because the user did not want the currency displayed in each cell they used the NODIM function to remove it. They do however want to display the Target Currency in a cell within the report.  Using Report Designer, I've tried to set up a Text Box to display this value, however, it is not in the list when looking at Constants, Filters or Variables or trying to display it in a Text box.  Has anyone found a way to be able to do this?

    Hi and thanks for the reply.  I should have stated that because this was a validated query, we'd like to do this without modifying the query and thus having to go through another lengthy validation process. That's why we did not go the route of adding Unit to the query but we may have to.  Another thing we can do is use a text variable in the headers that displays the currency. That works but, again, it's a query change whereas finding it in Report Designer will not require a query modification.

  • How can I display the descriptor column from a view in my BR message

    I have a table, Memberships, that contains a column for staff id. The staff data is on a remote database and I have created a view to access the required data. I have set the descriptor sequence for the name column of the staff view but the BR still displays the id.
    I'm assuming that because staff is a view and has no capi of its own, the membership capi cannot call the staff capi function display_label.
    I still would like to display the name of the staff member instaid of the ID. Can anyone suggest a workaround to force the display but without having to customize the membership capi after it has been created by headstart?

    Hi,
    try altering the code to create the capi.
    I modified this code allready quite a lot to achieve my goals.
    I also had that problem, and solved it by altering the code that generates the display_label. For each display_label funtion, I add a call to a package- function 'APPPA_LABEL.display_label' with parameters the tablename and the pk of the record. In the packagefunction, you can write your own definition of the display-label.
    The Productivity Boosters look a bit difficult in the beginning, but when you get to know them, you can achieve some good results.
    Greetings,
    Kristof

  • I got a virus off my computer and all my musics gone. I want to sync but Im afraid I'll loose all my not purchased music. How can I put all my music from my ipod back onto the computer?

    how do i transfer all my music, even non purchased ones, back onto itunes

    To transfer purchased music
    http://support.apple.com/kb/ht1848
    For non-purchased you will need a 3rd party program
    Example http://www.copytrans.net/

  • How can i display the values in a table when i press enter

    hi,
    I have three text boxes and a table with three columns in a jsp page.When i keyin some values in the text boxes and press Enter these values should be dispalyed in the three columns of the table.When once again if i key in the text boxes with some other values these values should also be displayed in the table columns in another row.Can it be done.Pls help me.Hoping for a reply.
    Thanks
    Naveen

    hi
    just go through the Code below:
    this helps you but this works in IE only.
    <html>
    <head>
    <script language="javascript">
    <!--
         function show(frm) {
              Show.innerText = frm.desc.value;
         } // closing the function show()
    //-->
    </script>
    </head>
    <form name="testform">
    <textarea name="desc" rows="3" cols="20"></textarea>
    <input type="button" name="buttsub" value="Submit" onClick="javascript:show(this.form)">
    <br>
    <table width="500">
    <tr><td bgcolor="#e6e6e6">
    <div id="Show"> </div>
    </td>
    </tr>
    </table>
    </form>
    </html>
    Cheers
    rambee

  • How can I drop the java objects from a schema

    hi..good afternoon all...
    How can I drop the java objects from a database schema???
    suppose the credentials are scott/tiger@db1
    Another thing is that...I have to do this from cmd(command prompt) as there is no plsql developer or sqldeveloper installed in the machine.
    plss help...thanks in advance...

    hi...i have already tried all the options..but it is showing the error..
    ora:01435 - user does not exist
    but when i have given the command...
    select object type, object_name, status from user_objects where object_type like'%JAVA%';
    then it is showing that the java_object is present....
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    SQL>
    SQL>
    SQL> set linesize 200
    SQL>
    SQL>
    SQL>
    SQL> select object_type, object_name, status from user_objects where object_type
    like '%JAVA%';
    OBJECT_TYPE OBJECT_NAME
    STATUS
    JAVA CLASS javaclass1
    VALID
    JAVA SOURCE javaclass1
    VALID
    SQL> drop java source javaclass1.java;
    drop java source javaclass1.java
    ERROR at line 1:
    ORA-01435: user does not exist
    SQL>

  • I recently had to do a complete system restore how do i transfer my itunes library from my iphone back onto my computer

    I recently had to do a complete system restore on my computer. How do i transfer the itunes content from my iphone back onto my computer?

    You don't.
    The music sync is one way - computer to iphone. The only exception is itunes purchases.
    The iphone is not a backup device.
    It has always been very basic to always maintain a  backup copy of your computer. Certainly you did not restore your system without making sure that your backup copy was up to date.
    Use your backup copy to put everything back.
    If for some reason you have failed to maintain a backup ( not good) then you can transfer itunes purchases from the iphone.  Without syncing:  File>Transfer Purchases

  • How can I browse the Adobe Market from my browser in stead of the tiny app display functionality?

    How can I browse the Adobe Market from my browser in stead of the tiny app display functionality?

    Hi,
    Can you please go through the following past forum posting: http://forums.adobe.com/message/4620312
    Hope that the info helps.
    With regards,
    Prabhu

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • Every time I start Firefox, the upgrade/signup page is displayed in one tabe while google, my start;up page s displayed in another. How can I stop the firefox page from loading every time?

    Every time I start Firefox, the upgrade/signup page is displayed in one tab while google, my start-up page is displayed in another. How can I stop the firefox page from loading every time?

    See these articles for some suggestions:
    * https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    * https://support.mozilla.com/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    * http://kb.mozillazine.org/Preferences_not_saved

Maybe you are looking for

  • Does Time Machine backup Entourage properly?

    If a user is using Entourage (an account is open) does Time Machine back it up properly? Anybody who has experience with this? Reason I ask is that backup programmes like ChronoSync will return a error if any user has an open account. In other words

  • Duplicate invoice posting due to archived accounting documents

    Hi, Duplicate invoice posting is allowing against the below two Invoice reference nou2019s In transaction MIRO. 00082 and 00072. After investigation I have found that these invoice reference nou2019s are used in 2002 for accounting documents 33001304

  • RFC configuration for system monitoring / Early Watch reports

    Hello Basis Gurus: Please help me out..... The early watch reports in the solution manager of my system are failing consistently to execute.This is happening for all the 3 systems DEV,QAS,PRD.when i click on individual earlywatch reports it takes me

  • HTMLLoader and Scrollbars

    I've been following the lynda.com AIR for Flash Devs tutorial. It shows how to add the Scrollbar Class to an HTMLLoader. Is it just me, or is Adobe's Scrollbar a rather odd implementation? I mean it works, but, for instance, the scroll handle you gra

  • How to exp/imp both diff character set tables between in DB1 and DB2?

    In the Solaris 2.7 ,the oracle 8i DB1 has NLS_CHARACTERSET ZHS16CGB231280 and NLS_NCHAR_CHARACTERSET ZHS16CGB231280 character set. In other linux7.2 system ,the oracle 8i DB2 is install into the NLS_NCHAR_CHARACTERSET US7ASCII and NLS_CHARACTERSET US