Combo box on JEditoPane (HELP)

hello,
is there any way for me to create a combo box on my JEditorPane at runtime... that is when i'm running my app i want to press the F4 key to make a combo box appear on the JEditorPane. I wanna also destroy it when i press F5.....
Thanks in advance for your help
Bernard

May be this is what you exactly want !Check this out.
import javax.swing.*;
import java.awt.event.*;
class Popup extends JFrame
    private JPopupMenu pop;
    private JList combo;
    private JEditorPane editor;
    Popup ()
        pop=new JPopupMenu();
        editor=new JEditorPane();
        editor.addMouseListener(new MouseAdapter(){
            public void mouseReleased(MouseEvent me)
                if(me.isPopupTrigger())
                  pop.show(editor,me.getX(),me.getY());
        String str[]={"Is ","this is","the one","you want ?"};
        JList combo=new JList(str);
        pop.add(combo);
        this.getContentPane().add(editor);
        this.setSize(500,400);
        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public static void main(String a[])
        new Popup();
}  NOTE :Right click on the editor to view the popup.

Similar Messages

  • Flash buttons and combo box's. Help

    Ok! Picture the scene. I have a combo box on the left hand
    side of the stage that holds difrent options of color's. And on the
    right side of the stage I have ten buttons showing the color's! So
    what I want to happen is! A person come's to this page and I want
    them to be able to eather select the option with the combo box drop
    down or be able to click on one of the color button's on the right
    hand side of the stage and it select that color in the combo box. I
    need this to happen because I will have lot's of option's
    (size,stlye,color,wood color ect..) for the person to look at and
    the combo box part will be way down at the bottom of the page.
    If any one can help that would be great! Or if you know of
    tutriols out there you can point me in that direction! Thank you
    all for reading!

    In which trigger you try to do this? Have you tried with when_new_block_instance?
    Here it works!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Tamer ([email protected]):
    Hello All
    I want to populate drop down list dynamically with this procedure. but when i use combo box every thing
    working fine. but i change to poplist (that what i want) at first time when populate the poplist working
    but when i try to repopulate the poplist i get this error message.
    'FRM-41337 Cannot populate the list from record group'
    i need to use poplist and repopulated it. how can i fix the problem.
    thankx
    PROCEDURE populate_lst IS
    p_input_query VARCHAR2(500):='SELECT ALL'
    | |' SMS_BOM_SECTION.SECTION_ID,'
    | |' SMS_BOM_SECTION.SECTION_ID Value'
    | |' FROM SMSDEV1.SMS_BOM_SECTION'
    | |' ORDER BY SMS_BOM_SECTION.SECTION_ID ASC';
    p_list_name VARCHAR2(50):='SMS_BOM_CENTRE.SECTION_ID';
    v_rg_id RECORDGROUP;
    v_list_id ITEM;
    v_rg_name VARCHAR2(20) := 'reg';
    v_retval NUMBER := 0;
    BEGIN
    --Find the list itself
    v_list_id := find_item(p_list_name);
    IF id_null(v_list_id)THEN
    bell;
    message('List item '| |p_list_name| |' did not exist');
    raise form_trigger_failure;
    END IF;
    --Find the record group itself
    v_rg_id := find_group(v_rg_name);
    --Delete the record group if it already exist.
    IF NOT id_null(v_rg_id)THEN
    delete_group(v_rg_id);
    END IF;
    --create the record group from query
    v_rg_id := create_group_from_query(v_rg_name,p_input_query);
    IF id_null(v_rg_id)THEN
    bell;
    message('Record group could not be created');
    raise form_trigger_failure;
    END IF;
    --Populate record group
    v_retval := populate_group(v_rg_id);
    --Populate the list if all is well
    IF v_retval = 0 THEN
    --Populate list
    populate_list(v_list_id,v_rg_id);
    --Delete record group
    delete_group(v_rg_id);
    ELSE
    --No able to populate record_group
    bell;
    message('can not populate the record group ');
    raise form_trigger_failure;
    END IF;
    END;<HR></BLOCKQUOTE>
    null

  • Please help with: A date split into 3 Combo Boxes ....

    Can someone help me with this Please?
    I have a date for a Date of Birth i.e. dd/MM/yyyy
    I need to split it up an place it into 3 combo boxes i.e. Day Combo, Month Combo and Year Combo.
    This is the code I have to set the combo boxes, now I need to bring it back into the combo boxes.
    can someone help me with the code as I need to have this finish on friday and I am running out of time. I just dont know what to do PLEASE SOMEONE HELP...
    Thanks
    Craig
    // List days
      private void DayOfTheMonth(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 1; index < highNumber; index++) {
          comboBox.addItem(String.valueOf(index));
      private void DaySpecificComboBox()
        DayOfTheMonth( 32, DayjComboBox);
    // List Months
      private void Month(){
        MonthjComboBox.addItem("");
        MonthjComboBox.addItem("January");
        MonthjComboBox.addItem("February");
        MonthjComboBox.addItem("March");
        MonthjComboBox.addItem("April");
        MonthjComboBox.addItem("May");
        MonthjComboBox.addItem("June");
        MonthjComboBox.addItem("July");
        MonthjComboBox.addItem("August");
        MonthjComboBox.addItem("September");
        MonthjComboBox.addItem("October");
        MonthjComboBox.addItem("November");
        MonthjComboBox.addItem("December");
    //List Years
      private void Year(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 2002; index > highNumber; index--) {
          comboBox.addItem(String.valueOf(index));
      private void YearSpecificComboBox()
        Year( 1900, YearjComboBox);
    private String StringFromDateFields(){
        int month =1;
        if (MonthjComboBox.getSelectedItem().equals(JANUARY))
          month = 1;
        else
          if (MonthjComboBox.getSelectedItem().equals(FEBRUARY))
            month = 2;
          else
            if (MonthjComboBox.getSelectedItem().equals(MARCH))
              month = 3;
            else
              if (MonthjComboBox.getSelectedItem().equals(APRIL))
                month = 4;
              else
                if (MonthjComboBox.getSelectedItem().equals(MAY))
                  month = 5;
                else
                  if (MonthjComboBox.getSelectedItem().equals(JUNE))
                    month = 6;
                  else
                    if (MonthjComboBox.getSelectedItem().equals(JULY))
                      month = 7;
                    else
                      if (MonthjComboBox.getSelectedItem().equals(AUGUST))
                        month = 8;
                      else
                        if (MonthjComboBox.getSelectedItem().equals(SEPTEMBER))
                          month = 9;
                        else
                          if (MonthjComboBox.getSelectedItem().equals(OCTOBER))
                            month = 10;
                          else
                            if (MonthjComboBox.getSelectedItem().equals(NOVEMBER))
                              month = 11;
                            else
                              if (MonthjComboBox.getSelectedItem().equals(DECEMBER))
                                month = 12;
                              String
                              DOB = DayjComboBox.getSelectedItem()+"/"+String.valueOf(month)+"/"+YearjComboBox.getSelectedItem();
                              return DOB;

    Thanks for your time.
    I could not get that to work ??
    I have come up with this code whitch seams to work. Thought you may like to see it
         String dobxml = xmlDoc.getValueOf(clientInfo, "DOB");
          String dob = dobxml.replace('/', ' ');
          System.out.println(dob);
          StringTokenizer tokenizer = new StringTokenizer(dob);
          String day = tokenizer.nextToken();
          String month = tokenizer.nextToken();
          String year = tokenizer.nextToken();
          System.out.println(dob);
          DayjComboBox.setSelectedItem(day);
          MonthjComboBox.setSelectedIndex(Integer.parseInt(month));
          YearjComboBox.setSelectedItem(year);ps thankyou
    Craig

  • AS3 - Combo Box making a hint for each item

    Hi Guys,
    I'm stumped. It might be something simple I'm doing wrong.
    I have an array populated by XML in a function by doing the following inside the function:
    first_special.addItem({label: xmlMenuFile.item.headers[i],data:
    xmlMenuFile.item.descriptions[i],data2: xmlMenuFile.item.hints[i]});
    The problem I'm having is trying to figure out a way so that the "data2" will fill the text field "hint_txt" on ROLL_OVER of that items name in the list.
    I've tried to placing an event listener into the function that populates the combo box but nothing helps
    // this populates the combo box label and data with the Loaded XML File. This works
    function changeHandler(ev:Event):void
         menuText_mc.heading1_txt.text = ev.currentTarget.selectedItem.label;
         menuText_mc.description1_txt.text = ev.currentTarget.selectedItem.data;
         heading1 = ev.currentTarget.selectedItem.label;
         includePrice1_mc.visible=true;
    // trying to figure out how to activate the 'hinting' function when you ROLL_OVER EACH ITEM in the 'first_special" combo box
    // and when rolling over it trace 'hello'. This DOES NOT WORK.
    first_special.addEventListener(MouseEvent.ROLL_OVER, hinting);
    function hinting(e:MouseEvent):void{
    // Should trace "hello" everytime I Roll_OVER an item in the Combo Box.     
         trace("hello");
    // calls the changeHandler function and works correctly
          first_special.addEventListener(Event.CHANGE, changeHandler);
    Any help with this would be great.
    Thanks

    For the hinting functionality, I think what you want to set up would be...
    import fl.events.ListEvent;
    function hinting(e:ListEvent):void{   
             var rowIdx:uint = e.rowIndex as uint;
             hint_txt.text = first_special.getItemAt(rowIdx).data2;
    first_special.addEventListener(ListEvent.ITEM_ROLL_OVER, hinting);
    What you had would only react to rolling over the main component, not the items, and that rollover wouldn't begin to happen until you selected an item since you buried the listener inside the change function.  Keep the listener out in the open.

  • How to get values in the combo box in a XML form?

    Hi All,
        1. I have created a property which has "Default value" as "Clothings" and  "Allowed Values(csv)" as Real Estate - Sales , Clothings etc" by navigating to KM > CM > Global Services > Property Metadata > Properties.
       2. In the XML form builder when I drag this property I get a combo box for this property.
       3. But when I preview this by going to Content Management > Folder > New > FORMS > and select my XML form project I get a preview but it is not showing me the default values in the combo boxes which I created using the property in XML form builder.
    Please Suggest me as to how to get those values (which I mentioned in property) in the combo box ?
    Thanks in Advance,
    Jasmine.

    Hi All,
      I ll make the above Query Simple.
    1.In Xml Form Builder when you drag a property which has some 3-4 assigned values so you are  recomended to use a combo box.
    2.But the problem after using COMBOBOX is I am not getting these values in the preview of the combo box.
    3.Help Required please its urgent.
    Thanks in advance,
    Jasmine.

  • Catching COMBO BOX item changed in VALIDATE event

    Hi expert,
    I need to catch the item changed event for a combo box.
    below the code:
    <B1Listener(BoEventTypes.et_VALIDATE, False)> _
    Public Overridable Sub OnAfterValidate(ByVal pVal As ItemEvent)
                Dim form As Form = B1Connections.theAppl.Forms().Item(pVal.FormUID)
                Dim mt As Matrix = Form.Items.Item("Matrix_0").Specific
    if (pVal.ColUID.Equals("TipoList") And pVal.ItemChanged) Then
    end if
    but pVal.ItemChanged is always equal to false even if I change the value selected in combo box.
    can anyone help me?
    Thanks in advance.
    Best regards
    Andrea

    Hi Andrea,
    you can also catch the Event through
    pVal.EventType =SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    through this event, you can perform you're reuqirement.
    regards
    shiva

  • Flash ph mysql combo box

    hey. need some help please. ive managed to get info from a
    mysql database into flash in a combo box. i have a text field and i
    want it to load in the corresponding data when a new title is
    selected in the combo box.
    any body help please?
    Matt

    You use the
    ComboBox.change
    event to respond to the choice. There is a good example at the
    link in the last sentence.
    As far as what you do in the change handler depends on your
    data:
    1. You can download all that data when you download the items
    for the combo box. You can store the values related to the item in
    the combobox in the data parameter. See
    ComboBox.additem.
    For example: comboBoxInstance.addItem({label:label[, data:data]}).
    Then using
    ComboBox.selectedItem
    you can get the data and populate other items in the change event
    handler.
    2. You only have key values stored as data in the combobox
    item. Then in the change handler you go to the server and fetch the
    data selected and then populate the other objects.
    The first way is preferable if the amount of data is
    reasonable because it requires downloading all the needed data for
    all the items all at one time. The second way is necessary if the
    data is excessive to be downloaded all at once.

  • Disable combo box

    quick question does anyone know how to disable a combo box?thanks

    This help you to disable combo bos in Internet Explorer, but in other browser don't work. To other browser I used the onGotFocus or onFocus event (I don't remember the name exsactly). When the combo recived the focus in give the focus to another object.
    I hpe that will be helpful for you.
    Regards.
    Alejandro

  • Combo Box & State View

    Hi, How do I populate the combox box to change to different
    state view? I know how to do it with normal link buttons and
    buttons: click="this.currentState='exampleState'". I'm just not
    sure how to apply that same method to the combo Box.
    Please help!
    Thanks!

    Hello Dany,
    I greatly appreciate your help.
    I think my code is some what similer to what you explained in your post above. I could be wrong but I think the problem is in the httpsercie call, the variable maybe in a wrong formate isn't isn't going over with the call to the php script.
    any help you can proved would be greatly appreciated.. thanks Dany
    the function which acts on the cb selection:
    private function DropDownBox1Handler(event:ListEvent ):void
       {  labelcountry1 = event.currentTarget.selectedItem;       }
    <mx:HTTPService id="dropBox2" url="http://localhost/Learning/inc/userlocationPS.php"
       useProxy="false"  method="POST" result="boxtwoHandler(event)" fault="faultHandler(event)" resultFormat="e4x">
       <mx:request xmlns="">
                <provincestate>{labelcountry1}</provincestate>           
            </mx:request>
      </mx:HTTPService>
    My php script for retriving the state/province code:
    require_once("connection.php");
    $wprovincestate = $_POST['provincestate'];
    //$test = "United States";
    $provinceState_query = "SELECT DISTINCT province from tb_location where country = '$wprovincestate'";
    $GetProvince_query = mysqli_query($dbconnect, $provinceState_query) or die('<br/>Error querying Province:'.mysql_error());
    print "<?xml version=\"1.0\"?>";
    print "<locations>";
    while($row = mysqli_fetch_array($GetProvince_query))
    { print "<location>";
    print "<province>". $row['province'] . "</province>";
    print "</location>";
    print "</locations>";
    mysqli_close($dbconnect);

  • Need Help, retrieving a combo boxes actual/print/visible value instead of the export value.

    Hello,
    I need help, retrieving a combo boxes actual value, not the export value.
    I have a combo box with multiple options to select from.
    each of those selections has a separate export value, which is in the form of a number, which I use to calculate dates in a separate field.
    However, I have another field that i want to retrieve the, users selected value, which is text, from the combo box instead of the export value.
    Is there an easy way to do this.
    This is what I am currently using. But like I said the results are that I retrieve the export value and not the selected text value.
    event.value = this.getField("_Arugula").valueAsString;
    Thanks

    First get the currentValueIndices property of the combo box and use it with the getItemAt field method to return (what I call) the display value. Something like:
    var f = getField("combo1");
    var display_value = f.getItemAt(f.currentValueIndices, false);
    See the documentation for more information

  • Combo box ( i can't solved. help me)

    hi, i have doubt in combo box
    <select name="branch">
    <option>chennai</option>
    <option>bangalore</option>
    <option>delhi</option>
    <option>mumbai</option>
    </select>
    In the above code i didn't use <option value> but i give the values between the <option>xxxx</option>tags.
    Now i want to retreive the values between the <option></option> tags.
    is it possible?.if yes how?. please send me code. it would be very helpful to me.

    linta mam..try this..
    I hope u know how to write js functions..
    write a function for onChange event of ur select ..
    inside the function u can give
    var index=document.getElementById("branch").selectedIndex;
    alert(document.getElementById("branch").options[index].text)

  • Prob in retaining spaces in Combo Box, PLEASE HELP ASAP!!

    Hi
    In the application that I am working on, I have developed a screen wherein I populate the names of some schemes from the database, in a combo box (<Select><option></option></Select>).
    A particular scheme in the database has a multiple-word name with double spaces between the two words, or rather between the last of the two words and the brackets.
    e.g. Help CRY (Child Relief & You).
    Now, when this name is fetched fro the database, the double spaces between the CRY and ( are retained but when I display them in the combo box, i.e. between the <option> tags, somehow the double spaces disappear.
    Further on, in my servlet, I retrieve the same scheme name from the combo box and try to fetch some other entries from the database. At that point, since one of the spaces has disappeared, there is no database match found for the scheme name selected and I'm unable to proceed. This problem arises in the case of any number of spaces between the words while populating the combo box. It however works fine when I remove the double spaces and retain a single space between the words.
    Please let me know ASAP if combo boxes eat up such spaces and convert any number of spaces into a single space as a property or is something wrong with the JSP I have here. If this problem can never be resolved as a rule, then please tell me so that I can force the data providers to make sure they filter out such double spaces before sending the data to our databases.
    I'll be very grateful if your can help me out asap as we have to put up the site at the earliest possible date.
    Thanks a lot,
    Soumya

    why not you try to set the option value, like this:
    <option value="Help CRY (Child Relief & You)">words you wan display</option>
    Think if the display is not right it will not affect you from extracting the value.
    Regards,
    Jas

  • ABAP Webdynpro cannot display value help, combo box properly in IE ?

    Hi WDA expert,
    I have problem developing webdynpro in NW 7.0 EHP1 SPS02. All the combo box, value help, drop down input did not properly display using IE 7.0 / 8.0. It is something like create another  blank input beside the original object.
    but everything ok if i am using mozilla firefox.
    I am not sure what is the problem with this.
    Please help.
    Thank You and Best Regards
    Fernand.

    Hi Thomas,
    Thank you for your response, But i am still not able to solve the problem. Let me give you more detail information regarding this issue.
    are you using the Portal? The other poster in this thread seems to think so, but I don't see anything in your postings to indicate that. IE7 is supported on your release/SP level. IE8 is not supported until SPS5.
    => I am not using portal it is just normal test from SAP GUI. I am using IE 8.0.6001.18702. So far i have tested the sample webdynpro "WDR_TEST_SELECT_OPTIONS" to 4 different server (PID, PIQ, ECD, ECQ) all using the same version NW 7.0 EHP 1 SPS02. (i have check for ABAP and BASIS package). The problem only occur in PID (Initially the icm service is not start so i use transaction SICF to start the webdynpro service) not sure if there is missing java script library ?
    Please refer in this link for the different result screen capture below:
    http://i802.photobucket.com/albums/yy310/pisuper/WDA_DEV.jpg   --> error in PID
    http://i802.photobucket.com/albums/yy310/pisuper/WDA_QA.jpg    -
    > success in PIQ, ECD, ECQ
    I would recommend clearing your browser cache and the server side cache. For the server side cache go to transaction SMICM and choose Administration->ICM->Exit Hard->Global.
    I have restarted the whole server and i did again from SMICM. But still having the same problem like in the screen capture.
    Are you using a standard or customized theme?
    I am using standard theme base on demo "WDR_TEST_SELECT_OPTIONS"
    Base on my latest investigation seems like those 3 success server PIQ, ECD and ECQ always download this file ls_ie6.nosprite.css in the internet temporary directory, but then no for PID. 
    is that any idea or suggestion that i can try to solve this problem. it seems like some configuration was missing for the standard theme in PID
    Thank You and Best Regards
    Fernand Lesmana
    Edited by: Fernand Lesmana on Jun 16, 2010 3:52 PM

  • Need help on combo box problem

    hi ,
    i have two combo box..... eg..c1,c2
    i retrieved data from database to display it in combo box c1.now my problem is using the selected value from combo box c1 i have to display the respective value in c2..
    eg.
    if Product type=injection (in combo box c1)
    then
    in c2 the product name for injection available should be displayed by retrieving it from database...
    this is my code
    <%
    //query for selecting the values from the database
    stm=con.createStatement();
    ResultSet rs=stm.executeQuery("select Dosageform from ProductMaster");
    %>
    <!-- Displaying the values in the combo box -->
    <form name="form1" method="post" action="">  <select name="eid" id="eid" onchange="display(this)">
    <%
    while(rs.next())
    %>
    <OPTION VALUE=""><%=rs.getString("Dosageform")%></OPTION>
    <%
    %>
    </select>
    <select name="combo2">
                   </select>i don't know how to write the function display for this....
    can any one help me...
    Thanks
    kalai

    hi
    thanx to all who sees my forum.
    now i was able to create a depenent box but now i'm facing two problems
    1. when i submit the form my previous value from the combo box is not selected
    2. when i first load the page the value in the 2nd combo box doesn't has the value as null...
    my code
    function display()
      var index=document.form1.drug.value;
      document.form1.hid.value=index;
      form1.submit();
    function refresh()
       var val;
       val=document.form1.hid.value;
       drug.SelectedIndex=value;
    <div class="tr1">
    <td>Product Name</td>
    <%
    //query for selecting the values from the database
       rs=stm.executeQuery("select DrugName from ProductMaster");
    %>
    <!-- Displaying the values in the combo box -->
    <form name="form1" method="post" action="">
    <select name="drug" id="drug" onChange="display()">
    <option value="">-- select -- </option>
    <%
    while(rs.next())
    %>
    <OPTION VALUE="<%=rs.getString("DrugName")%>"><%=rs.getString("DrugName")%></OPTION>
    <%
    %>
    </select>
    <input type="hidden" name="hid">
    </div>
    </tr>
    <tr>
    <div class="td1">
    <td>NDC code #</td>
    <%
    //query for selecting the values from the database
    String sql1 = "SELECT ProductCode from ProductMaster where DrugName='"+request.getParameter("hid")+"' ";
    rs=stm.executeQuery(sql1);
    %>
    <SELECT NAME='ndc'>
    <% while (rs.next())
    String val1=rs.getString("ProductCode");
    out.println ("<OPTION VALUE='" + val1 + "'>" + val1 + "</OPTION>");
    %>
    </div>i don't know wht to do...
    pls help me as soon as u can...
    Thanks & Regards
    kalai

  • Connected Combo box problem !   please help me

    Dear Friends....!
    I am developing project in which i have 3 combo :
    1) District Selection
    2) Taluka Selection
    3) Village Selection
    Depend on village selection , perticular persons on that village is displayed on the page.
    This values must be fetched from DATABASE !
    <b> I tried with JAVASCRIPT but with it i can connect two combo and
    can't access database inside javascript. WHAT IS THE SOLUTION EXCEPT AJAX ( That i don't KNOW ) </b>
    may be i can put 3 combo together and on first OnChange event
    i can submit page and process another page and put values in
    another combo and forward page to combo page again.
    i am very much confused HELP ME !
    please i don't know AJAX else problem would be easily solved.
    EVEN I CAN"T MANUALLY PUT DATA IN JAVASCRIPT bcoz my villages
    are more than 400.
    how to put java database code in javascript OnChange event ???
    to fetch data of another combo ?
    HELP WITH EASY SOLUTION.
    Thanks
    GHanshyam
    ================================
    SOLUTION FOR TWO COMBO
    function populate(o) {
      d=document.getElementById('de');
      if(!d){return;}                
      var mitems=new Array();
      mitems['Choose']=[''];
      mitems['Salads']=['Select Item','Tuna Salad','Cesar Salad','Green Salad','Prawn Salad'];
      mitems['Main Courses']=['Select Item','Filet Mignon','Porterhouse','Flank','T-Bone'];
      mitems['Drinks']=['Select Item','Milkshake','Soda','Mixed Drink','Juice'];
      mitems['Desserts']=['Select Item','Ice Cream','Fresh Fruit','Pie'];
      mitems['Snacks']=['Select Item','Brownies','Cookies','Potato Chips'];
      d.options.length=0;
      cur=mitems[o.options[o.selectedIndex].value];
      if(!cur){return;}
      d.options.length=cur.length;
      for(var i=0;i<cur.length;i++) {
        d.options.text=cur[i];
    d.options[i].value=cur[i];
    <!-- Paste this code into the HEAD section of your HTML document.
    You may need to change the path of the file. -->
    <script type="text/javascript" src="dropdownBox.js"></script>
    <!-- Paste this code into the BODY section of your HTML document -->
    <form action="" method="get">
    <label for="or">Our menu:</label>
    <select name="or" id="or" onchange="populate(this)">
    <option value="Choose">Select from the Menu</option>
    <option value="Salads">Salads</option>
    <option value="Main Courses">Main Courses</option>
    <option value="Drinks">Drinks</option>
    <option value="Deserts">Deserts</option>
    <option value="Snacks">Snacks</option>
    </select>
    <label for="de">Select:</label>
    <select name="de" id="de"></select>
    <input type="submit" value="Show me" />
    </form>
    <p><div align="center">
    </div><p>

    may be i can put 3 combo together and on first
    OnChange event
    i can submit page and process another page and put
    values in
    another combo and forward page to combo page again.Almost there. What you should do is submit the page on the onChange event of the combo box; but submit to the same JSP. Then, depending on the values that each of the combo boxes contains, run a query for villages in that District and under that Talluka.
    And populate the third combo box. If any one of the ( first two ) boxes is empty i.e user didnt' select a value, then you'll automatically get no value for the combo boxes from the query.
    Something like this
    <%
        String selectedDistrict = request.getParameter("districtcombobox");
        String selectedTalluka = request.getParameter("tallukacombobox");
        //make sure you don't nulls
        selectedDistrict = selectedDistrict == null?"":selectedDistrict;
        selectedTalluka = selectedTalluka == null?"":selectedTalluka;
        PreparedStatement psFetchTallukas = con.prepareStatement("select tallukaname from tallukas where tallukadistrict = ?");
        PreparedStatement psFetchVillages = con.prepareStatement("select villagename from villages where villagetaluka = ?");
         psFetchTallukas.setString(1, selectedDistrict);
         psFetchVillages.setString(1, selectedTalluka);
       rsTallukas = psFetchTallukas.executeQuery();
       rsVillages = psFetchVillages.executeQuery();
    //now, print out your <option> elements under the corresponding <select> tags for each of the 3 select boxes
    %>For your onChange event you don't need to do anything except call form.submit() where the action should be the same JSP. In case your form is going to be submitted to another page on the final submit i.e after selecting all required values; then in the onChange event handler, before the submit(), you should change the action property of the form to the same page and then submit.

Maybe you are looking for

  • Adobe Creative Cloud / Desktop App / Home Screen: Constant Spinning Wheel

    Adobe Creative Cloud: Home Screen / Constant blue spinning wheel Mcc OSX LION I had the same problem: ........ went on for weeks... Fixed by logging out of all my Adobe Creative Cloud Assets.... Restarting machine and resigining in..... everyyyyy whe

  • How do I transfer a file which is already on my iPod into a folder which is also on my iPod?

    I have files I have transferred from my PC to my iPod, and I cannot arrange them into folders, so they are just a disorganized bunch of documents. These are not music files, as I use my iPod for work. I am able to make folders, but unable to put anyt

  • Re: Serious speed loss on infinity all of a sudden

    A couple of times a week my upload and download speed via Wi-Fi drop to a snails pace. Normally I get 30Mbps download and 7Mbps upload. Often on a Monday morning I get 0.1Mbps both up and down on all wireless devices, the connection is reliable but u

  • Parts missing in PDF and AI

    When i send my ai or pdf-files, the receiver only can see (and most inportant) print part of the drawing. I tried to save is as a earlier version because the recever is working on cs5 (while i am working with cs6 on OS X 10.8.1) but no change in the

  • Demand Management Report

    Hi, I just want to know if there is any standard report available for display of demand before MRP run. So that we can see the demand for the future and also corresponding item costs with reference to the future. This should help me to predict my bud