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);

Similar Messages

  • Update variable value from Web Item Drop Down Box

    Hi Experts,
    My issue is that i have dropdown on Characteristic 0EMPLOYEE so when ever the user enter the template restricting with a costcenter then the the list of employee will be displayed but when user restricts the template view to a employee using the dropdown then can we pass the employee restricted in dropdown box to a variable in Planning function.
    Regards,
    Raj

    Hi Raj,
    You can do the following.
    1. Create a filter on your aggregate level. Add 0Employee to the filter. Create an user input variable (ZV_EMPLOYEE) on 0Employee which will be used to hold the values entered by the user.
    2. Assing the above created variable to the 0employee in filter.
    3. In the planning function (FOX), create a local variable for 0Employee . Eg. DATA VAR_EMPLOYEE TYPE 0EMPLOYEE.
    4. Assign the variable value passed by user to this local variable in FOX
    VAR_EMPLOYEE  = VARV(ZV_EMPLOYEE).
    5. If the employee count is more use FOREACH statement in the FOX. like FOREACH VAR_EMPLOYEE.
    6. Creat a planning sequence which will have the same filter and the function.
    7. You can also use the same filter in your plan query as well, so that the data set remains same.
    This will solve your problem. Please writ back in case any clarification is required..
    Regards, Rishi

  • How to get rid of the stupid drop down box in the search box

    Thank-you for the help. I am not sure if I put this is the right spot or not, but I wanted to take the time to say thank-you to the people who answered :
    "Chosen solution
    If you want to restore the previously used standalone window to manage search engines then you can toggle this pref to false with a middle-click on the about:config page.
    about:config page: browser.search.showOneOffButtons = false
    Close and restart Firefox to the change effective. "
    I LOVE Firefox but it is so frustrating when I can't just right click and "paste and search"
    i have to do A LOT of searching for work and I had to switch to chrome for a few days until I found this solution because the new search box messed with our internal software (sorry I would tell you more but I don't really understand computers that much, but I am so glad to have my old friendly fox back!!!)... Thanks guys, Brit

    thanks for the feedback - since your question doesn't really contain any other request for support, i'm going to close the thread...

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • How to capture the value selected in the drop down box

    Hi all,
    I am populating values in  drop down box by using FM vrm_set_values in module pool.
    like below
    01  ABC
    02 ACB
    03 BCA
    04 CAB
    in module pool drop down box element name is RQGM-VALUE.
    Problem is what ever the value is select in the drop down box from above element RQGM-VALUE is not filling any value.
    i need to capture the value selected in the drop down box and pass it to another variable.

    Hi,
    Refer this standard code. Your issue will be resolve.
    REPORT demo_dynpro_dropdown_listbox.
    TYPE-POOLS vrm.
    DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
    DATA: wa_spfli TYPE spfli,
          ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    TABLES demof4help.
    name = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE init_listbox OUTPUT.
      CLEAR demof4help-connid.
      SELECT  connid cityfrom cityto deptime
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF wa_spfli
       WHERE  carrid = demof4help-carrier2.
        value-key  = wa_spfli-connid.
        WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'.
        CONCATENATE value-text
                    wa_spfli-cityfrom
                    wa_spfli-cityto
                    INTO value-text SEPARATED BY space.
        APPEND value TO list.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = name
                values = list.
    ENDMODULE.
    MODULE user_command_100.
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE user_command_200.
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'SELECTED'.
        MESSAGE i888(sabapdocu) WITH text-001 demof4help-carrier2
                                            demof4help-connid.
      ENDIF.
    ENDMODULE.

  • How can I insert a spreadsheet containing drop down boxes and links to other spreadsheets into a keynotes slide?  Please help :(

    How can I insert a spreadsheet containing drop down boxes and links to other spreadsheets into a keynotes slide?  Please help
    I need to retain all the formula's and the sheets these formulas are linked from.

    Have you considered switching out of Keynote and over to your spreadsheet program when you get to this slide? If you launch the speadsheet program before Keynote you can switch using Command-Tab. You can then switch back into Keynote when you are done.
    I realize that this is not what you were looking for but I don't think it is possible to do exactly what you want.

  • Since upgrading to Firefox 4 I've been unable to select search items from the google drop down box in the toolbar. Instead, I have to retype my search item completely as I also unable to select 'auto-complete' items as they appear.

    Since upgrading to Firefox 4 I've been unable to select search items from the google drop down box in the toolbar. Instead, I have to retype my search item completely as I also unable to select 'auto-complete' items as they appear.

    Known problem with the Google Toolbar extension. <br />
    http://www.google.com/support/toolbar/bin/static.py?page=known_issues.cs

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • JSF:how to get value from dinamically generated HtmlInputText components�H�H

    <h:panelGroup binding="#{dynamicInputGroupBean.group}"/>
    public HtmlPanelGroup getGroup() {
              if (this.getSelectedComp() == null) {
                   return this.group;
              FacesContext facesContext = FacesContext.getCurrentInstance();
              Application application = facesContext.getApplication();
              this.group = new HtmlPanelGroup();
              Set pSet = this.getSelectedComp().getParameterses();
              int size = pSet.size();
              this.instanceValue = new String[size];
              int i = 0;
              for (Iterator it = pSet.iterator(); it.hasNext();) {
                   Parameters tempP = (Parameters) it.next();
                   HtmlOutputLabel outputLable = new HtmlOutputLabel();
                   HtmlInputText inputText = new HtmlInputText();
                   inputText.setId("p" + i);
                   String valueBindingExpression = "#{dynamicInputGroupBean.instanceValue["+i+ "]}";
                   System.out.println(valueBindingExpression);
                   ValueBinding valueBinding = application
                             .createValueBinding(valueBindingExpression);
                   inputText.setValueBinding("value", valueBinding);
                   outputLable.setFor(inputText.getId());
                   outputLable.setValue(tempP.getParaname() + ": ");
                   group.getChildren().add(outputLable);
                   group.getChildren().add(inputText);
                   i++;
              // group.getChildren().add(new HtmlInputText());
              return group;
         }as codes show above, i successfully genera HtmlInputText dinamicaly�C
    but i got problems while i try to print those values...
    after the the jsp page presents in my browser,
    i input some words in the input components,
    and then click a commandButton hold an action to print their value
    action code :
    String[] tempArray = this.getInstanceValue();
    for (int i = 0; i < tempArray.length; i++) {
    System.out.println(tempArray);
    only NULL has been printed in the consol ....not the word i inputed!!!
    so my question is how can i get values from those
    dinamically generated HtmlInputText ????

    This approach is odd. What's the functional requirement after all? You normally attach the inputtext value to a backing bean property and do the desired command button action which is attached to a backing bean action method. In this method you then use the value for the query.

  • How to get values from an IFrame...

    Hi everyone. I have come to a complete stop i my project and need to ask the following: How do i get the values from an IFrame.
    Situation: I have a main.jsp page that contains an IFrame(data.jsp). Data.jsp is basically made up of a bunch of checkboxes. The state of these boxes(checked or unchecked) is determined and set by a JAVA program and the results are then stored in a StringBuffer. Contents of Stringbuffer could look something like this: <tr><input type='checkbox' name='box0' CHECKED></tr>.
    The StringBuffer in then presented in the IFrame(data.jsp) like so: <%=res.getInfo()%>
    The user should be able to check or uncheck the boxes from the main.jsp page then when pressing a submit button the changes should be stored in a DBase.
    After the submit button have been pressed i go into my Servlet's doPost() method for some basic processing. This is were the problem starts. I usally use HttpServletRequest.getParameter(String param) to get values from the main.jsp page. But these checkboxes are stored in the IFrame, so how do i go about to retrieve the values from data.jsp from the doPost() method or in some other way maybe. This is quite urgent and i hope that i have explained the scenario in enough detail.
    Any help would be greatlly apritiated.
    Best regards
    Peter

    Hello
    Just try this link
    http://www.faqts.com/knowledge_base/view.phtml/aid/13758/fid/53
    HTH

  • How to get values from a stored package variable of type record ?

    Sir,
    In my JClient form, I need to get values from a database stored package variable of type record. And the values are retained in the JClient form for the whole session. The values are copied only once when the form is started.
    What is the best way to do that ?
    Thanks
    Stephen

    Stephen,
    not sure what your model is, but if it is Business Components, I think I would expose the properties as a client method on the application module. This way all JClient panels and frames will have access to it. You could use a HashMap to store the data in teh app module.
    If JDBC supports the record type, then you should be able to call it via a prepared SQL statement. If not, you may consider writing a PLSQL accessor to your stored procedure that returns something that can be handled.
    Steve Muench provides the following examples on his blog page
    http://otn.oracle.com/products/jdev/tips/muench/stprocnondbblock/PassUserEnteredValuesToStoredProc.zip
    http://otn.oracle.com/products/jdev/tips/muench/multilevelstproc/MultilevelStoredProcExample.zip
    Frank

  • How to get value from one context node to otehr contect conde in diff views

    Hello Guru's
    We have a rek which is of getting the value from one context node to other context node,
    for example there is Total value in BT111H_OPPT/ITEMLIST (One context node) we need to have the same Total value in the in BT111H_OPPT/DETAILS (other context node) automatically
    Inputs are highly appricated.......

    Hello,
    Thanks for your Reply
    But my rek is i want to get value from different views
    eg BT111H_oppt/itemslist(contex node - BTADMINI) field net value to BT111h_opp/Details(Context node - BTopporth)
    for this which method should i use to chive this.
    Thanks..

  • AppleScript how to use "get" for field information and drop-down boxes?

    Hi all,
    First post.
    Looking to use the "get" function or similar for getting information in a list or from a drop-down box or a field.
    Example, you open keychain, open the info. for a cert and want to read the currently selected trust setting for "When using this certificate" drop-down.
    Or, you want to check the Common Name field under details.
    How would I return these specific values?
    Thank you,
    -b

    The exact question being asked here: http://forum.soft32.com/mac/select-table-row-ftopict101735.html
    But, that doesn't work with the latest AppleScript.

  • From database to drop down box

    Hi all,
    Suppose I have the following
    String query ="Select name, number from Person";
    I want to put all the "names" in a drop down box and all the "numbers" in a separate drop down box. When I do this:
    while(rs.next()){
    <select="person" onchange="showSelection">
    <option value="<%=rs.getString("name")%>"><%=rs.getString("name")%></option></select>
    I only get the value of the first name in my table. Can anyone help me?

    Hi
    I think you need to do some order. my suggestion is to create an Object that contains name and number like this:public class MyClass {
         String name;
         int number;
         public MyClass(String n,int num){
              setName(n);
              setNumber(num);
         //set and get methods for the data members...
    }next, roll over the ResultSet and create MyClass object each time and add it to a Vector or something like that. usually a drop down box displays many times and it will be very bad if you will query the data base each time you want to display it, thats why i suggest you to save this Vector in a bean or somewhere else (of course, if the data is static).
    than display the vector content like this:<select name="person" onchange="showSelection">
    <%     Enumeration e=vec.elements();
         while(e.hasMoreElements()){
              MyClass m=(MyClass)e.nextElement();
    %>          <option value="<%=m.getName();%>"><%=m.getName();%></option>
    <%     }%>
    </select>
    <%     e=vec.elements();
    %><select name="number" onchange="showSelection">
    <%     while(vec.hasNext()){
              MyClass m=(MyClass)vec.next();
    %>          <option value="<%=m.getNumber();%>"><%=m.getNumber();%></option>
    <%     }%>
    </select>pay attention on how you wrote the select tag: <select="person"...
    and not: <select name="person"...
    hope it helps
    mamtz
    BTW
    think of using struts and custom tags in jsp it will much easier to do this!!!

  • Multiple Drop down boxes

    I have a jsp in which i'm using 5 drop downs.
    I have to populate the last 2 drop downs according to the value selected in the first 3 drop downs. I can do this by selecting the first three drop downs and submitting the form, then load the other two drop downs. But I do not want to do it that way.
    Please reply if you guys think of any other way.
    Thanks for the help.
    Anjana

    Hi Priyankaswings,
    Thanks for the reply. I guess you didn't understand what i was asking for.
    According to what you said("if the value in first drop box is Fruit then in other drop box values are apple mango whatever .. like form validation"), it's not the problem selecting one drop box's value according to an other one.
    here's my original problem description
    ************************************************************************I have a jsp in which i'm using 5 drop downs.
    I have to populate the last 2 drop downs according to the value selected in the first 3 drop downs. I can do this by selecting the first three drop downs and submitting the form, then load the other two drop downs. But I do not want to do it that way.
    For example, I have 1st drop down "Vehicles"(Cars, Vans,Trucks, MotorBikes), 2nd drop down "Types"(Sports cars, SUV's, family cars,Luxury cars etc), 3rd drop down "Make"(Acura, Honda, Volvo, Lexus, mazda, Vokswagon etc). These three drop downs will all be populated from the database. When the user selects one from each drop downs, according to that combination you need to populate the "Model".
    Say i selected Cars in 1st drop down, SUV's in the second and Volvo in the third , it should populate the model according to the selected three values. Hope you get a clear picture now.
    It's actually combination of three drop down boxes that i need to look for. And if at all the user keeps changing the selection of even one drop down out of the first 3 drop downs, the value of the last 2 drop downs will be changed.. Any idea???
    Thanks,
    Anjana

Maybe you are looking for