How to get  Subvalues using Combo box ?

Hi , friends,
I have one Combo box :
Having list of all Districts
When i select one of District it will give all related villages
regarding District that i selected in another combo box.
How to achieve this ? in one page itself
I have another idea but its not good..
where
1) first select District from Combo
2) Press submit
3) second page displays another combo and fetch perticular villages
and display in another combo.
but this technique requires more page navigation.
I want it should be on one page itself
PLEASE HELP ME ....
Ghanshyam
Message was edited by:
Ghanshyam

the brand old dependent combo issue..
as far as i know i could tell you for every two days a similar post is being posted here on the same thread..
you could have taken a look of them....
Anyways there are many ways of doing it....
In the days when XmlHttpRequest Object was not invented ppl used to achieve this using Hidden iframe and then updating parent frame dropdown by calling a javascript function onload of the page. or by auto refershing the page after saving the form state inside the scope of session.
However,using XmlHttpRequest Object (AJAX) nowdays is one of the smater ways of acheving tasks as these.
checkout one such examples where i've posted a similar example in the last reply
http://forum.java.sun.com/thread.jspa?threadID=5170019
hope this might help :)
REGARDS,
RaHuL

Similar Messages

  • How to get values of combo box?

    Hi All,
    I had a problem that need to be solve asap. I would be very appreciated if anyone could help me.
    I had a combo box that contain a string "Flower and Gifts" and when i passed the value to another jsp file it show only "Flower". I had been think for a long time about this problem. How can i pass the value to another jsp file with the whole value "Flower and Gifts".
    Please reply asap. Thanks all.

    Hi,
    Even i had the same problem earlier. Just try to print the string that you are passing to the next page, if it reads something like this "Flowers%20and%20Gifts" then you have to replace the special characters (i.e.,'%,2,0')with the blank spaces so that you have the complete string.
    Example:
    String str = "Flowers%20and%Gifts";
    if(str.indexOf('%')!=-1)
    str = str.replace('%','');
    Thanks,
    Rkanth

  • Getting Dates using combo boxes

    I am trying to get a start date and an end date from a combo
    box. I have the following AS3 code but it doesn't work. startDay,
    startMonth etc are all comboboxes with appropriate data. Just can't
    figure the syntax to make it work.
    var start_date = new
    Date(startYear.selectedIndex,startMonth.selectedIndex,startDay.selectedIndex);
    var end_date = new
    Date(endYear.selectedIndex,endMonth.selectedIndex,endDay.selectedIndex);
    then i want to calculate and display the total days
    var nDiffDays = Math.floor((end_date - start_date)/86400000);
    totalDays_txt = nDiffDays;
    Any help appreciated.

    There are two of those controls: the drop down list and the combo box. Try the drop down list instead.

  • Locating on a location on GMap using combo box using SDK

    Hi All,
    I have a requirement to locate a city on google map using combo box. I want name of cities to appear in combo box and on selecting a city, map should be able to locate that city. This combo box will be visible on map itself. Combo box can be a component of either Xcelsius or Flex Builder.
    I think combo box dragged from Xcelsius component panel not able to communicate with google map which is embedded in form of swf through manage and packager.
    So, I tried with Flex Builder combo box component, but not able to done it. I am not getting the flow how to communicate between combo box and google map.
    I can locate a particular city giving a latitude and longitude through propertysheet.
    Please, if anyone could help me out asap.
    Thanks in advance!

    Hi Monammed,
    The said functionality should work. Please check your logic one more time. Also, try using some spreadsheet components mapped to the cells in question and understand how the data is flowing during run-time. This will help you test things. Delete spreadsheets when you are done with identifying the issue.
    Lets check the combo box mapping one more time : Map the source of the combo to the entire range; labels in the combo box ONLY to the country column in the source range(typically this may be the left most column in the range); selected item should be mapped to the cell that has the destination for the icon and the type for default selection may be dynamic. Well, if there is any hard-coding of values involved anywhere, do check the spellings and other trivial things.
    Do let me know if this was helpful and if you need any more help.
    Thanks,
    Prasanna

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • Using Combo box at the backend

    Hi,
    I am using combo box at the backend to filter rows to a particular destination.
    The problem is the labels are going to populate at the runtime and the selection of item in combo box is also going to populate at the run time. I have an icon which inserts eg: country in a cell, then this cells is used by combo box as a item selection(label) to filter rows from source. But unfortunately the comb box is not selecting any value i.e no item is selected dynamically. But if i manually drill down it is working but the label is not changing dynamically based on the changes in label by icon.
    For eg my data:
    Country and profit populate at run time
    Country          Profit
    India               5000
    Germany        4000
    Now i have icon which selects country (hard coded in excel) upon clicking the mouse on it and inserts in A1 suppose the value hardcoded is "India". Now this A1 is used as a "selected item" for combo box. the source to combo box is the above country and profit which populates at run time.
    Now when i execute the dashboard. The value is inserted in A1 after clicking the icon but it is not picked up by combo box as "item selected" and hence combo box does not filter any data.
    Can any pls help.
    Thank you. I will award full points for correct solution.

    Hi Monammed,
    The said functionality should work. Please check your logic one more time. Also, try using some spreadsheet components mapped to the cells in question and understand how the data is flowing during run-time. This will help you test things. Delete spreadsheets when you are done with identifying the issue.
    Lets check the combo box mapping one more time : Map the source of the combo to the entire range; labels in the combo box ONLY to the country column in the source range(typically this may be the left most column in the range); selected item should be mapped to the cell that has the destination for the icon and the type for default selection may be dynamic. Well, if there is any hard-coding of values involved anywhere, do check the spellings and other trivial things.
    Do let me know if this was helpful and if you need any more help.
    Thanks,
    Prasanna

  • How do you add a combo box into a Jfilechooser?

    how do you add a combo box into a Jfilechooser?
    thanks

    See the API For JFileChooser
    public void setAccessory(JComponent newAccessory)Extend a JPanel or Such like, put your Combo Box on it, fiddle around with event handling code for the ComboBox..
    Set an Instance of that as The Accessory for the JFileChooser.
    Look In Your Docs:-
    <JAVA_HOME>/Demo/jfc/SwingSet2/src , unpack SwingSet2.jar if neccessary
    In there is a demo of using A JFileChooser with an accessory Panel, and Source code that is adaptable...

  • How to run c   using dos box in mac

    I have installed dos box but have trouble finding how to open c++ using dos box. A blue screen of dos box appears what are we supposed to enter there to get in c++

    No XML required, but you must put the class into a package.
    Packages are folders with some files that identify whats in them, so you will end up with something like
    yourWebbApp/classes/yourPackage/yourClass

  • How can I make the combo box turn to the value of black.

    When the show button is pressed (and not before), a filled black square should be
    displayed in the display area. The combo box (or drop down list) that enables the user to choose the colour of
    the displayed shape and the altering should take effect immediately.When the show button is pressed,
    the image should immediately revert to the black square, the combo box should show the value that
    correspond to the black.
    Now ,the problem is: after I pressed show button, the image is reverted to the black square,but I don't know
    how can I make the combo box turn to the value of black.
    Any help or hint?Thanks a lot!
    coding 1.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class test extends JFrame {
         private JPanel buttonPanel;
         private DrawPanel myPanel;
         private JButton showButton;
         private JComboBox colorComboBox;
    private boolean isShow;
         private int shape;
         private boolean isFill=true;
    private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
    "green", "lightgray", "magenta", "orange",
    "pink", "red", "white", "yellow"}; // color names list in ComboBox
    private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
                              Color.gray, Color.green, Color.lightGray, Color.magenta,
                              Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
         public test() {
         super("Draw Shapes");
         // creat custom drawing panel
    myPanel = new DrawPanel(); // instantiate a DrawPanel object
    myPanel.setBackground(Color.white);
         // set up showButton
    // register an event handler for showButton's ActionEvent
    showButton = new JButton ("show");
         showButton.addActionListener(
              // anonymous inner class to handle showButton events
         new ActionListener() {
                   // draw a black filled square shape after clicking showButton
         public void actionPerformed (ActionEvent event) {
                             // call DrawPanel method setShowStatus and pass an parameter
              // to decide if show the shape
         myPanel.setShowStatus(true);
                   isShow = myPanel.getShowStatus();
                                            shape = DrawPanel.SQUARE;
                        // call DrawPanel method setShape to indicate shape to draw
                                            myPanel.setShape(shape);
                        // call DrawPanel method setFill to indicate to draw a filled shape
                                            myPanel.setFill(true);
                        // call DrawPanel method draw
                                            myPanel.draw();
                             myPanel.setFill(true);
                             myPanel.setForeground(Color.black);
                   }// end anonymous inner class
         );// end call to addActionListener
    // set up colorComboBox
    // register event handlers for colorComboBox's ItemEvent
    colorComboBox = new JComboBox(colorNames);
    colorComboBox.setMaximumRowCount(5);
    colorComboBox.addItemListener(
         // anonymous inner class to handle colorComboBox events
         new ItemListener() {
         // select shape's color
         public void itemStateChanged(ItemEvent event) {
         if(event.getStateChange() == ItemEvent.SELECTED)
         // call DrawPanel method setForeground
         // and pass an element value of colors array
         myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
    myPanel.draw();
    }// end anonymous inner class
    ); // end call to addItemListener
    // set up panel containing buttons
         buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
         buttonPanel.add(showButton);
    buttonPanel.add(colorComboBox);
    JPanel radioButtonPanel = new JPanel();
    radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
    Container container = getContentPane();
    container.setLayout(new BorderLayout(10,10));
    container.add(myPanel, BorderLayout.CENTER);
         container.add(buttonPanel, BorderLayout.EAST);
    setSize(500, 400);
         setVisible(true);
         public static void main(String args[]) {
         test application = new test();
         application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    coding 2
    import java.awt.*;
    import javax.swing.*;
    public class DrawPanel extends JPanel {
         public final static int CIRCLE = 1, SQUARE = 2;
         private int shape;
         private boolean fill;
         private boolean showStatus;
    private int shapeSize = 100;
    private Color foreground;
         // draw a specified shape
    public void paintComponent (Graphics g){
              super.paintComponent(g);
              // find center
    int x=(getSize().width-shapeSize)/2;
              int y=(getSize().height-shapeSize)/2;
              if (shape == CIRCLE) {
         if (fill == true){
         g.setColor(foreground);
              g.fillOval(x, y, shapeSize, shapeSize);
    else{
                   g.setColor(foreground);
    g.drawOval(x, y, shapeSize, shapeSize);
              else if (shape == SQUARE){
         if (fill == true){
         g.setColor(foreground);
                        g.fillRect(x, y, shapeSize, shapeSize);
    else{
                        g.setColor(foreground);
    g.drawRect(x, y, shapeSize, shapeSize);
    // set showStatus value
    public void setShowStatus (boolean s) {
              showStatus = s;
         // return showstatus value
    public boolean getShowStatus () {
              return showStatus;
         // set fill value
    public void setFill(boolean isFill) {
              fill = isFill;
         // set shape value
    public void setShape(int shapeToDraw) {
              shape = shapeToDraw;
    // set shapeSize value
    public void setShapeSize(int newShapeSize) {
              shapeSize = newShapeSize;
    // set foreground value
    public void setForeground(Color newColor) {
              foreground = newColor;
         // repaint DrawPanel
    public void draw (){
              if(showStatus == true)
              repaint();

    Hello,
    does setSelectedIndex(int anIndex)
    do what you need?
    See Java Doc for JComboBox.

  • How to get title in Dialog box

    How to get title in Dialog box like "Adobe® Connect™ "

    Works for me. What happened when you tried?
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    tell application "Finder" to display dialog "I need ® or ™ in dialog box text" with title "I need ® or ™ in dialog box text" buttons {"Aha!"} default button 1</pre>

  • In ABAP HR how to get job using position

    In ABAP HR how to get job using position (Using Infotype 1001)

    Hi anilkumar,
    1. u have the position
       u want the Job
    2. In hrp1001 table
       OTYPE = 'S' (for position)
       OBJID  = POSITION (AS ABOVE)
       SCLAS = 'C' (for finding job)
    <b>   SOBID = XXXXXX (here u will get the JOB)</b>
    regards,
    amit m.

  • How  to get  the  Save  dialouge box  in   SAP Business One

    Hi,
    How  to get the  Save dialouge box in    Button  click  event  in  SAP Business One.
    Thanks,
    Y.

    Hello,
    You would like to display an SaveFileDialog box?
    may follow this thread, and you can find a sourcecode in vb.net and c# inside (for open dialog, but it is the similar...)
    Regards
    János

  • How to get image using Http and how to save in Smulator

    Hi guys,
    Am working in black berry bold. i dont know how to get image using htp connection and one more thing i need to save this image in side simulator directory............. what are the specific API i should...
    Guide me.........

    If you want the input image size you need to pass it in as parameters.
    A discussion thread on this topic is:
    http://forums.adobe.com/thread/29948
    -- Daniel R. <[email protected]> http://danielr.neophi.com/

  • How to get System status Check Boxes into Query selection screen

    Dear experts,
    Pleas help in knowing how to get System status Check Boxes into quick view query (SQVI), selectionscreen.
    Regards
    Jogeswara Rao
    Edited by: K Jogeswara Rao on Jul 6, 2010 7:26 PM

    Problem solved through other Forum
    (Checkboxes not possible, some alternative solution to my requirement found)

  • Hi out there. To capture a screen shot one uses: Command-Shift-3 or 4. I have done this for a long time. Now suddenly neither screen shot works anymore. Suggestions how to get this useful function back? Thanks, Georgx

    Hi out there. To capture a screen shot one uses: Command-Shift-3 or 4. I have done this for a long time. Now suddenly neither screen shot command works anymore. Suggestions how to get this useful function back? Thanks, Georgx

    Command-Shift-3 and 4 works just fine on several Macs that I have here.
    Try restarting your Mac....or post in the specific support area for your Mac model....for more advice.
    https://discussions.apple.com/index.jspa

Maybe you are looking for

  • How do I move and operate iPhoto from an EHD

    Need to free up space on IHD - want to move iPhoto (11 - 9.5.1) to EHD - have over 24K photos/videos.  I just purchased iPhoto Library Manager (sweet!) and have cleaned up my photos/videos and broken down into 12 different libraries.  How do I implel

  • "Slow motion" effect during songs - this is REALLY annoying!

    My iTunes has started to do this thing (usually towards the start of the song) where the song gets very choppy and/or plays in slow motion. This will happen too if I do something like rate one of the songs while music is playing. My pc has plenty of

  • Always larger Swap memory than compressed in Mavericks 10.9.3

    I bought MBP about 3 weeks ago and had an update to Mavericks 10.9.3 a few days ago. I am not sure if this problem started after the update, but I had never seen any "Swap Used" at least before the update. Now, if you look at the screenshot below, wh

  • Approval at purchase requisition level only

    Hi Experts, We want approval only at purchase requisition level and once PR is approved, PO should be created without any approval. I know we can make it happen by having release streategy at PR level and remove any release streatgy at PO level. Plea

  • Pros and Cons selecting Ext to file Catalog

    I am in a quandry. I bought LR 1. and never had the chance to put anytime to learn how to use it. I am starting a new, so just got LR 2.2, and would like to do it the most practical and best way. I use an iMac 10.5, with 350 GB int HD, and have 3 Ext