Need for help in select tag with jsp

i have a select tag about shoeing countriesin a register form and according to the selection of country i want to shoe the names of its cities .............i guess it has something to so with js and i have a little experience in it
..........................................if somebody have the answer i'll b thankfull 4 this

<%@page import="java.sql.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>register</title>
     <SCRIPT LANGUAGE="JavaScript">
     function checkForm(form){
                    var len = form.elements.length;
               for (var i = 0; i < len; i++)
                                   if ((form.elements.value == null || form.elements[i].value == ""))
                                             alert("Please enter your " + form.elements[i].name + ".");
                                             form.elements[i].focus();
                                             return false;
                                   return true;
     </SCRIPT>
     <script>
               function subForm()
                    frm=document.forms.register;
                    frm.action="register.jsp";
                    frm.submit();
     </script>
</head>
<body>     
          <H3>WELCOM IN REGISTER PAGE </H3>
          <table align="center" border="0"width="100%">
               <form name="register" method="post"action="reg.jsp">
                    <tr>
                         <th>
                         Country
                         </th>
                         <td>     
                         <select name="country" onChange="subForm()" >
                         <option value="-1">choose</option>
                              <%!private Statement stmt;%>
                              <%!private ResultSet rs;%>
                              <%!private String h;%>
                              <%!private int s;
                         private int s2;
                              private String b;%>
                              <%
                              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                              Connection conn = DriverManager.getConnection("jdbc:odbc:data", "", "");
                              stmt=conn.createStatement();%>
                              <%
                         b= request.getParameter("country");
                         rs = stmt.executeQuery(" select* FROM Country");
                         Integer int3=java.lang.Integer.valueOf(b).intValue();
                         s2=int3;
                         if(s2!=-1)
                              while(rs.next())
                              %>
                         <option value="<%=rs.getInt(1)%>">
                         <%=rs.getString("Country_name")%>
</option>
                              <% }     %>
                                   <%
     h=request.getParameter("country");
Integer int1=java.lang.Integer.valueOf(h).intValue();
s=int1;
}else{
                         rs = stmt.executeQuery(" select* FROM Country where country_id='"+s2+"'");
                    if(rs.next())
                              %>
                         <option value="<%=rs.getInt(1)%>">
                         <%=rs.getString("Country_name")%>
</option>
                              <% }     %>
                              <% }     %>
                                   </select>     
                         </td>
               </tr>
               <tr>
                         <th>
                              City
                              <br>
                         </th>
                         <td>
                         <select name="city">
                              <option value="-1">choose</option>
<%
                              rs = stmt.executeQuery(" select* FROM City where Country_id='"+s+"'");
                              while(rs.next())
                              %>
                         <option value="<%=rs.getInt(1)%>"><%=rs.getString("City_name")%></option>)
                         <%
                         out.println(request.getParameter("City"));
                         %>
                         </select>     
                         </td>
                         </tr>
                         <tr>
                              <th>First Name</th>
                              <td><input type="text"name="firstName" size="30"></td>
                    </tr>
                         <tr>
                              <th>Last Name</th>
                              <td> <input type="text"name="lastName" size="30"></td>
                         </tr>
                         <tr>
                              <th> Email </th>
                              <td><input type="text"name="email" size="30"></td>
                         </tr>
                         <tr>
                              <th> UserName </th>
                              <td><input type="text"name="userName" size="30"></td>
                         </tr>
                         <tr>
                              <th> Password </th>
                              <td> <input type="Password"name="password" size="30"></td>
                         </tr>
                         <tr>
                              <th><input type="submit" VALUE="Submit Data" onClick="return checkForm(this.form);"></th>
                              <th></th>
                         </tr>
                         <tr>
                              <th><input type="reset" VALUE="Reset Form"></th>
                              <th></th>
                         </tr>           
                         </table>
               </form>
</body>
</html>

Similar Messages

  • "Hi,I need a help something wrong happen with my ITunes ,during to the download progress,after few seconds is report ; U can not download,err" in Using iPad • 0 bookmarks

    "Hi,I need a help something wrong happen with my ITunes ,during to the download progress,after few seconds is report ; U can not download,err"
    in Using iPad •

    It's better to post the URL of the feed (as you have subsequently done) than the contents of the feed .
    From the FeedValidator report the feed is basically OK for iTunes. There are several occasions where 'content:encoded' sections (following immediately on 'guid' tags) should be enclosed in
    <description>...</description>
    tags: however all this will be ignored by iTunes anyway and only applies to other readers. The 'potentially dangerous content' referred to by FeedValidator is within the 'content:encoded' tags and so isn't relevant to iTunes. They are referring to an inline css style, and I don't know whether this might cause a problem elsewhere.
    You should really have a language tag, e.g.
    <language>en-us</language>
    (you have a dc:language tag but that's for a different system). This should be placed in the top section, before the first 'item' tag.
    It's advisable to have an 'itunes:explicit' tag for each 'item' -
    <itunes:explicit>yes IF CONTAINS ADULT MATERIAL, OTHERWISE no</itunes:explicit>
    it's not compulsory if you have no adult material, but you must have a 'yes' if you do.
    You can check your feed by subscribing in iTunes from the 'Advanced' menu - this has the same result as clicking the 'Subscribe' button on the Store page. If it works OK there you are ready to submit it.

  • Hi! I'm new to mac so I need for help.Why when I open safari also open some pages that I don't click?

    Hi! I'm new to mac so I need for help . Why when I open safari also open some pages that I don't click? What should I do ,get any cleaner ?

    Please review the options below to determine which method is best to remove the Adware installed on your computer.
    The Easy, safe, effective method:
    http://www.adwaremedic.com/index.php
    If you are comfortable doing manual file removals use the somewhat more difficult method:
    http://support.apple.com/en-us/HT203987
    Also read the articles below to be more prepared for the next time there is an issue on your computer.
    https://discussions.apple.com/docs/DOC-7471
    https://discussions.apple.com/docs/DOC-8071
    http://www.thesafemac.com/tech-support-scam-pop-ups/

  • Hello plz i need yours help i have problem with my i cloud back up when i restore old back up t

    hello >> plz i need yours help i have problem with my i cloud back up when i restore old back up my problem exact with contact cause it disappears from contact list

    iPhone: Transferring information from your current iPhone to a new iPhone

  • I can't download the apps with big size like need for spees, but in apps with normal size(less than 100KB)there is no problem,is there any body who can help me?

    I can't download the apps with big size like need for spees

    Have a little patience. 4 minutes is only a short time for someone to find your post and reply to it. Also clicking on "This Solved My Problem" marks your problem as solved so many folks that may otherwise help will pass the question by since it is "solved."
    I suggest you start a new question that gives a good title to a specific problem. Then in the body of the thread describe the problem in detail, tell us what steps you have tried so far to correct the problem, what happened, and what error messages you received.

  • IN DESPERATE NEED FOR HELP flashing question mark appears MacBook

    Hello everyone, I got this White MacBook Mac OS X 10.4.11 yesturday I was updating limewire and iTunes, I was downloading some songs from Limewire when all of a sudden my macbook frozed. I was not able to do a thing. Not even minimizing nor quiting the app nor even opening another aplication, so I decided to shut it down by holding the power button until it shut down (about 8 secs). So I restart my macbook and I got this grey=blank screen whit a flashing question mark on it. I've tried EVERYTHING on this link http://support.apple.com/kb/TS1440?viewlocale=en_US even these one http://support.apple.com/kb/HT1533 and all I was able to accomplish, was to hold the mouse (/trackpad) button to eject a Cd, and while pressing Shift during startup (in order to start in Safe Boot mode) all I get is this lock image and this space to type a password. I've tried typing every password I know and I can't fix my macbook. Can anyone please help me out on this one?

    It means certain system files needed for startup are corrupted. You will have to reinstall OS X. If your hard drive is unaffected you can try the following:
    How to Perform an Archive and Install
    An Archive and Install will NOT erase your hard drive, but you must have sufficient free space for a second OS X installation which could be from 3-9 GBs depending upon the version of OS X and selected installation options. The free space requirement is over and above normal free space requirements which should be at least 6-10 GBs. Read all the linked references carefully before proceeding.
    1. Be sure to use Disk Utility first to repair the disk before performing the Archive and Install.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Do not proceed with an Archive and Install if DU reports errors it cannot fix. In that case use Disk Warrior and/or TechTool Pro to repair the hard drive. If neither can repair the drive, then you will have to erase the drive and reinstall from scratch.
    3. Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When you reach the screen to select a destination drive click once on the destination drive then click on the Option button. Select the Archive and Install option. You have an option to preserve users and network preferences. Only select this option if you are sure you have no corrupted files in your user accounts. Otherwise leave this option unchecked. Click on the OK button and continue with the OS X Installation.
    4. Upon completion of the Archive and Install you will have a Previous System Folder in the root directory. You should retain the PSF until you are sure you do not need to manually transfer any items from the PSF to your newly installed system.
    5. After moving any items you want to keep from the PSF you should delete it. You can back it up if you prefer, but you must delete it from the hard drive.
    6. You can now download a Combo Updater directly from Apple's download site to update your new system to the desired version as well as install any security or other updates. You can also do this using Software Update.

  • Need Suggestion on including JSTL Tags with JSF

    Hi..All....
    I need some suggestions.. i Started doing a project in JSF.. i am new to JSF...
    I Developed some part of the project in Struts.. but now.. our clinet says... The Application Has to go
    with JSF.so.. started redesigning again....
    Can i use JSTL...where ever i want....when i am developing a JSF Application...
    Please suggest..me...
    Thanks.. for the Help..
    Arthi

    I am freely mixing jstl and jsf in my project using:
    JSTL RI 1.2
    JSF RI 1.2
    Tomcat 6
    i am mixing c:forEach and h: tags successfully, which i needed for some javascript functionality that i could not do with data table. but stick to JSF wherever possible!

  • Help a new guys with JSP!

    Hi,
    i'm a new programer with JSP.
    I've created a class files that connect a database.
    But i would like to know how to write text with JSP?
    I would like to write a 'thank you' message after saving a form in a database.
    does its possible to have it in my class files?
    thanks for your help.

    Im not an expert on jsp or java but i will try to give my ideas.. i hope i can help you =)
    /* you could actually forward your servlet to your confirmation file like this : */
              ServletContext sc = getServletContext();
    .// just fill up here the variable msg , u cud write to its value your thank you message or something else like error messages
              RequestDispatcher rd = sc.getRequestDispatcher("/Confirmation.jsp?msg="+msg);          
              rd.forward(req, res);     
    /******* or u cud also throw ur request to the same jsp and display the ***/
    /******* message thru a form tag using javascript like this : ***/
    suppose your main jsp is this:
    <html>
    <head>
    <STYLE TYPE="text/css">
         .noBorder{
              border: white 0px solid;
              background-color: white;
              font-family:Arial;
              font-size:13px;
              font-weight: bold;
              color:green;
              width:300px;
              text-align:center;
    </STYLE>
    </head>
    <%!
    Connection conn;
    PreparedStatement pstmt;
    private doInsert(String name){
    // this is an oracle connection
    String sql = "INSERT INTO TABLENAME(FIELD1) VALUES(?)"
    try{     
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // just fill up the dburl , dnusername and dbpassword
    conn = DriverManager.getConnection(dburl,dbusername,dbpassword);
    pstmt = conn.prepareStatement(sql);
    pstmt.clearParameters(); // clear any previous parameter values
    pstmt.setString(1,name);
    pstmt.close();
    }catch(SQLException se){     
    }catch(Exception e){          
    }finally{
    if(conn!=null){
         try{
         conn.close();
         }catch(SQLException se){}
    %>
    <body>
    <form method=post"" name="msgscr">
    <tr><td colspan="2"><input type="text" name="msg" value="" class="noBorder" disabled/></td></tr>
    </form>
    <%
    if(request.getParamater("submit")!=null){
    // you could also add a return value for doInsert method to check whether the dbase insertion
    // is successful or not if the return value is true then the value for the document.msgscr.msg.value
    // is thank you otherwise u cud put "Unable to process your request" or other message
    doInsert(request.getParameter("name"));
    out.println("<script>document.msgscr.msg.value='Thanks you!!!!';</script>")
    %>
    <!-- this means that the request qill be thrown on this file-->
    <form method="post">
    <tr>
    <td>NAme : </td>
    <td><input type="text" name="name" value=""/></td>
    </tr>
    <tr><td colspan="2" align="center"><input type="submit" name="submit " value="Submit"></td></tr>
    </form>
    </body>
    </html>     
    /**** or you could also do the confirmation message just by adding an **/
    /**** alert message using javascript like this: **/
    <head>
    <script language="javascript">
    function ValidateCreate(theform){
         if(theform.name.value==""){
         alert("name is required");
         return false;
         }else{
         alert("Thank you!!!!");
    return true;
    </script>
    </head>
    <body>
    <form method="post" onsubmit="return ValidateCreate(this)">
    <tr>
    <td>NAme : </td>
    <td><input type="text" name="name" value=""/></td>
    </tr>
    <tr><td colspan="2" align="center"><input type="submit" name="submit " value="Submit"></td></tr>
    </form>

  • Need SQL help in select data from 2 table..

    hi,
    i need some help here as i am new to sql statement
    I have 3 tables.
    Table1 :- TeamID, Team_Name, Team_Logo
    Table2:- TeamID, PlayerID
    Table3:- PlayerID, Player_Name
    How do i do a single select statement that select all information from table1 and the count of playerID from table2?
    My MS access table has relationships.
    One team can have many players. So how do it get the numbers of player in my team?
    Thanks.

    Thanks.
    but may i know why i have to max (a.team_name)???Actually there is no need of max() here, but it must be an aggregate function to use in this context. There is no harm in using it like this. This is a work around, I didn't get enough time to work on it.
    But as long as it gives correct result, don't worry about it.
    btw, how do i assign duke $$ to u?
    i am new to this forum.You can read at http://forum.java.sun.com/rewardFaq.jsp#assign
    Have a nice weekend.
    Sudha

  • Need a help on implemening SAML with Oracle Service Bus

    We are implementing Webservice security using SAML with Oracle Service Bus for our project. We are in dire need of help in implementing the same. We have found some documents (osb console help, osb security) from the oracle web site but those documents have high-level details only. If we get the step-by-step flow and examples of implementing the Webservices security using SAML with Oracle Service Bus, it would be appreciated.
    Requirement details:
    1. Client application has to generate the SAML assertion (token) and pass that token to the OSB proxy service in a SOAP header along with the request.
    2. OSB proxy service gets the authentication token from the inbound request
    3. The token is passed to an SAML Identity Assertion provider and validate the token
    4. If the token is validated successfully then pass the valid token to appropriate business services.
    5. Business services communicates the appropriate external web services after validating the token and gets the response.
    Environment details:
    1. Oracle Weblogic Application Server 10g3
    2. Oracle Service Bus 10g3
    Thanks,
    Suresh Mani

    We are implementing Webservice security using SAML with Oracle Service Bus for our project. We are in dire need of help in implementing the same. We have found some documents (osb console help, osb security) from the oracle web site but those documents have high-level details only. If we get the step-by-step flow and examples of implementing the Webservices security using SAML with Oracle Service Bus, it would be appreciated.
    Requirement details:
    1. Client application has to generate the SAML assertion (token) and pass that token to the OSB proxy service in a SOAP header along with the request.
    2. OSB proxy service gets the authentication token from the inbound request
    3. The token is passed to an SAML Identity Assertion provider and validate the token
    4. If the token is validated successfully then pass the valid token to appropriate business services.
    5. Business services communicates the appropriate external web services after validating the token and gets the response.
    Environment details:
    1. Oracle Weblogic Application Server 10g3
    2. Oracle Service Bus 10g3
    Thanks,
    Suresh Mani

  • I need your help regarding Macbook Pro with FCS3 via USB

    Sorry for the double posting, I need your help...
    I am producing an independent TV movie. We are shooting in HDV with a Sony Z5.
    Currently I am using a 2007 iMac (1gb) for the FCS3. I am considering buying a Macbook Pro 15' i7, because I need the portability as well as a WD 1TB portable external drive.
    Just when I am about to buy the machine I started to read all about the USB vs. the Firewire. What should I do? The MBP only have one firewire port...if I use an USB portable external drive means that I won't be able to use FCS3 properly and that buying a MBP will mean spending money in something that I won't be able to make it work properly??
    Thanks for your help!!!!

    Hi there,
    As Patrick said its Firewire hubs you should avoid along with directly connecting your media drive via USB. USB hubs are fine for connecting peripherals (keyboards, tablets, mice etc). directly connecting USB media drives is not for streaming video due to their method of sending data in packets rather than as the continuous stream that firewire provides. Firewire hubs just seem to cause all sorts of headaches to those that have used them, I cant give you a specific reason other than splitting the available FW bandwidth (someone with more knowledge on this will have to chime in), its more just inherited practice.
    cheers
    ANdy

  • Need Urgent Help. ORA-12500 with no reason

    I need urgent help.
    I have 8.1.7.2.1 on Win2K.
    I get ORA-12500 error when trying to connect oracle instance. This problem begin to arise only when number of sessions reach a number about 200. At the same time there is no definite boundary for it. Once it happened when there were 216 session, then 196, then 206.
    There rarely (1/100) I get ORA-12514 and after again ORA-12500. Once I got ORA-12600.
    What it might be you think? It can't be a problem in listener.ora or in tnsnames.ora because it works fine if number of sessions is about 100. It tried to restart tnslistener (from lsnrctl and the service) and restarted database (but not the service). I did it different in sequences, but didn't help. What should I do? Is it a known bug?

    I need urgent help.
    I have 8.1.7.2.1 on Win2K.
    I get ORA-12500 error when trying to connect oracle instance. This problem begin to arise only when number of sessions reach a number about 200. At the same time there is no definite boundary for it. Once it happened when there were 216 session, then 196, then 206.
    There rarely (1/100) I get ORA-12514 and after again ORA-12500. Once I got ORA-12600.
    What it might be you think? It can't be a problem in listener.ora or in tnsnames.ora because it works fine if number of sessions is about 100. It tried to restart tnslistener (from lsnrctl and the service) and restarted database (but not the service). I did it different in sequences, but didn't help. What should I do? Is it a known bug? bash-2.03$ oerr ora 12500
    12500, 00000, "TNS:listener failed to start a dedicated server process"
    // *Cause:  The process of starting up a dedicated server process failed.
    // The executable could not be found or the environment may be set up
    // incorrectly.
    // *Action: Turn on tracing at the ADMIN level and reexecute the operation.
    // Verify that the ORACLE Server executable is present and has execute
    // permissions enabled. Ensure that the ORACLE environment is specified
    // correctly in LISTENER.ORA. The Oracle Protocol Adapter that is being
    // called may not be installed on the local hard drive. Please check that
    // the correct Protocol Adapter are successfully linked.
    // If error persists, contact Oracle Customer Support.
    There is not enough info to go on but the problem seems to be either in the listener.ora
    or tnsnames.ora. Did you make any changes before this started occurring?
    William

  • Help needed for a new Mac user with his photo and video librarys

    after swopping my Ericson for an iphone a year ago. then taking delivery of an iPad on launch day. I have finally taken the plunge and swopped my windows pc for a lovely 27" iMac... what have I been doing all these years using windows? using the Mac is a joy.
    As I get more involved with their products I am constantly fascinated (and frustrated) by Apples way of doing things. this situation is no exception and I need Apple people with Apple experience to help me make a decision. 
    I am looking at software to organise my photos and videos. I have approximately 7000 photos residing on a windows home server. in addition to that there are some 200 or so HD videos taken with either my Sanyo Xacti camcorder or Sony DSC W300 camera. both cameras I think produce MPEG format
    my first experience was iPhoto. great for the `price' but not very flexible. single libraries, poor editing facilities. and because I have files referenced and not copied to my iPhoto library, if I deleted from the library its not deleted from the server (and vice versa). this leads to images being displayed in the library that don't exist etc.
    then I downloaded the Aperture 3 trial. great until I came across the `Unsupported file format' situation with the MPEG videos that strangely enough, iPhoto will recognise and play (the Apple way of doing things).
    1. should I put the photos on the Mac instead of the server?
    2. Is there a better way of managing the images for deletions etc
    3. should I stick with Aperture because of the editing
    4. is there a better software or way of managing the videos
    sorry for the ramble but its all new to me

    had a good session on all three of the recommended programs and now have a better understanding of the excellent advice I have been given.
    iPhoto
    great `free' program that is easy to use but somewhat limited on features. think I would always be looking to upgrade from here (feels a bit boring)
    Aperture
    really enjoyed using this but at £170! a hefty price tag considering its limited file support. fortunately its only my camera video clips (MPEG) that it wont view. my camcorder files (MP4) are fine so this is looking better as a one stop solution.
    Elements
    much more than just a image touch up. considering what it can do.. very good value at around £60. teamed with iPhoto it becomes even more attractive.
    My issue still remains with the masters file location.
    I would prefer to keep all my media on the external server to ensure I have a fail safe recovery option. its a 4TB 5 disk affair which contains all the family music, video images and DVD's etc (likely to change to a Mac server in the future!)
    one feature that I cant find, (even in Aperture which surprises me), is the ability to automatically manage deletions from referenced locations? i.e. delete a file from the server and when aperture opens up the thumbnails are updated. or, delete a referenced master in Aperture and an option comes up to delete the referenced file on the external drive.
    how would a professional photographer or studio using Aperture manage this process (or would they use something else?)
    forgot to mention that through our student facilities i can get a discounted copy of Photoshop CS5 for around £175 which is close to Aperture. is this a worthwhile option or overkill
    Message was edited by: buttons129

  • URGENT : Help needed for OLAP tools selection

    Hi Gurus,
    Environment :
    Oracle 10g
    .net web application with backend as Oracle 10g server embaded with OLAP server.
    Application - CRM
    Feature requreid - OLAP, OLAP Reporting, Drilldown graphical analysis, US MAP view location specific queries, Ad-hoc analysis.
    I have to take a descision for for the OLAP tool selection with above mention client requirement.
    * Please let me know if anybody have worked on above combination for the required features and held up with any issue (if any) ?
    * Please go thru Oracle options below per feature and let me know is there any issue with .NET and IIS server,Oracle 10g OLAP compatibily ? specially for following points from the below details -
    4. OLAP Reporting Tool :
    6. Web deployment of Cubes :
    8. Graphing :
    9. Geographical Map View based query :
    1.Extraction Transformation and loading (ETL) Tool : Oracle Business Intelligence Warehouse Builder, tightly integrated with Database Server.
    2. Analysis Tool (Multidimensional Data Analysis using cubes) : Oracle Business Intelligence Discoverer·     
    3. Ad-hoc query and analysis by end User :
    Oracle Business Intelligence Spreadsheet Add-in.OLAP DML Regular Sql with OLAP_TABLE Function.
    4. OLAP Reporting Tool :     Oracle Reports 10g.
    5. Multidimensional Data (Cube) Query Language     OLAP DML : Regular Sql with OLAP_TABLE Function
    6.Web deployment of Cubes : Available
    7. Cube data export to xls, html, format : Available
    8.Graphing : Oracle Reports 10g Graph Wizard for Graphical Analysis.
    9. Geographical Map View based query : Oracle Locator: Location-Enabling Every Oracle Database
    Please send me the relevent urls in support / issues for the above featues.
    TIA,
    Sheilesh

    The only Adobe program I know that can edit images is Photoshop.
    If you have troubles with Google software, you need to post in the appropriate Google forum.

  • Problem with SELECT tag in Jsp

    Hi!
    How do I keep my selection in the dropdown menu. When I choose somthing the page reloads and the option does npt persist. Help?
    <sql:query var="result"
         sql="SELECT ${param.category}ID id, ${param.category} name
         FROM ${param.category}"/>
    <select name="selCategory" onChange="submit()">
         <option>--------- V�lj ---------</option>
              <c:forEach items="${result.rows}" var="row">
              <c:set var="categoryRows" value="${row.id}"/>
              <option value="<%= pageContext.getAttribute("categoryRows") %>" >
                   <c:out value="${row.name}"/>
              </option>
         </c:forEach>
    </select>

    This code works fine for me:
    <%@ taglib uri="/jstl-c" prefix="c" %>
    <html>
         <body>
         <%
              int array[] = new int[] {1,2};
              session.setAttribute("array", array);
              String arrayNames[] = new String[]{"One", "Two"};
              session.setAttribute("arrayNames", arrayNames);
         %>
              <form action="?">
              <select name="select">
                   <c:forEach items='${ sessionScope.array}' var="row">
                        <c:choose>  
                             <c:when test="${param.select== row}"> >
                                  <option value="<c:out value='${row}'/>" selected><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:when>   
                             <c:otherwise>
                                  <option value="<c:out value='${row}'/>"><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>
              <input type="submit" name="submit" value="submit"></input>
              </form>
         </body>
    </html>
    good luck.
    MatrixPooh
    www.bizdisplay.com

Maybe you are looking for

  • Cross company production cost

    Hello All, My question is: When I post a goods movement(cross plants belong to different company), i want to change the value at the FI document: case: Plant A,  company code A, Material  M01, standard price = 10 usd/pc Plant B,  company code B, Mate

  • IPad imovie?

    I don't have a mac, and wish to purchase one. I saw the new iPad and was interested in learning more about the product. I realized it does not have any iLife programs like iMovie and i am wondering if anyone knows if Apple is considering incorporatin

  • Error -43 when opening a quicktime over the network

    Hi, a really strange one here. I've moved our FTP server internally to a different Mac running 10.5.x Server. Everything seems to be working except when we try and play a quicktime over the network on a Windows PC. The file will play correctly in VLC

  • Can not download adobe flash player 9

    I have un-installed Adobe Flash Player 9 even though it was installed and working for a while.My game called Farmville on Facebook said I need to install Adobe 9 and the game stopped working.That makes no sense.So after I un-installed and followed th

  • Why won't my Itunes update to 11.4 It always asks to restart but once i restart it, it just goes back to saying i need to update it again?

    Why won't my Itunes update to 11.4 It always asks to restart but once i restart it, it just goes back to saying i need to update it again?