Combo box help

ok i have 3 combo boxs - name, id, pic
the first combo box name determines the values of the other comboboxes. the id combo box value changes successfully
but when i try and change the value of the pic combobox i get
an out of bounds error. can anyone suggest some advice?
String name = namecombo.getSelectedItem().toString();
nametextfield.setText(name);
idcombo.setSelectedIndex(namecombo.getSelectedIndex());
// piccombo.setSelectedIndex(namecombo.getSelectedIndex());
//the line above produces the error

no unfortunately they have the same number of items.
i have tried everythingNo, they don't, if they did, then there wouldn't be an OOB error. Try this:
String name = namecombo.getSelectedItem().toString();
nametextfield.setText(name);
idcombo.setSelectedIndex(namecombo.getSelectedIndex());
System.out.println(namecombo.getItemCount());
System.out.println(idcombo.getItemCount());
System.out.println(piccombo.getItemCount());
// piccombo.setSelectedIndex(namecombo.getSelectedIndex());
//the line above produces the error

Similar Messages

  • Combo Box Help {CS4}

    I want to create a combobox so that when they choose whatever
    value it takes them to a new web page.
    for expample:
    Default value: Choose your chapter
    Second value: Chapter 1
    Third Value: Chapter 2
    I would like for when Chapter 1 and 2 are chosen it send them
    to chap1.html or chap2.html.
    I set up the values so that the label was Chapter 1 (or 2)
    and that the data was chap1.html (or chap2).
    How do i do the AS to make this work in CS4? And also i am a
    total noob to the world of AS.
    Thank you for the help.

    OK, there is a ComboBox class if you look in Flash
    Help. I'm not familiar with CS4 help, I use Flash 8, but the class
    itself should be described in every case. So, you select the
    combobox instance on the stage, it has properties, open the
    properties panel, add the labels for the items you want displayed
    in the combobox. You can add items directly with AS as in the
    example below, which is a direct excertp from Flash8's help:
    Components Language Reference > ComboBox component >
    ComboBox.selectedIndex
    And Flash help doesn't actually help much in this case .....
    So, you'll need a function like :
    if(myComboBox.selectedIndex==0){
    //actions;
    and so on, based on the number of items you have in the
    combobox
    BTW, you can also use the list component for your needs. In
    every case you need a listener and an "if" function

  • 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

  • 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.

  • Help with Combo Box Component

    I am creating an application with comboboxes and using action
    script to load them. I can figure out how to change text color of
    the choices in the combo box, but can anyone tell if it is possible
    to make the text choices appear as different colors. For instance
    if I wanted all of the choices to be black text, but for the third
    choice down to appear red.
    Thanks for the help.

    You can set the backgroubd color if that helps.
    To set the second item to have a red background, attach this
    to the combobox:
    on(open){
    dropdown.setPropertiesAt(1,{backgroundColor:0xFF0000})
    }

  • Help with linking combo boxes so that some options are made unavailable

    Hello!
    I'm having trouble setting up an interactive PDF form with multiple combo boxes.
    I have designed an interactive PDF form in InDesign CS6 but am doing the final preparation and formatting in Adobe Acrobat XI Pro.
    First of all, I am not sure if I should be using combo boxes or list boxes, but the combo box seemd to look better after I export the PDF and also left the field blank, ready for selection from the drop-down menu.
    Basically I have a list of drop-down lists, but not all combinations are compatible. For example, after maing "Selection 1" in "Combo box 1", I need only "Selection 1", "2", and "3" [out of the total 5] to be available in "Combo box 2".
    I need to be able to apply this algorhythm to the next few combo boxes as well.
    Moreover, I would need some of the checkboxes disabled [the user won't be able to check them at all]when I make a certain selection in some of the combo boxes.
    Needless to say, I don't know any Java, coding or making calculations in LiveCycle Designer, so I don't even know where to begin.
    I have attached a screen grab of my form and what I want to achieve.
    Any help would be very much appreciated.
    Thank you!

    If it is static data, I would suggest you to cache it rather than having it in each of the user session. You can have configuration/code to refresh when needed. Please look at any available caching frameworks (EhCache, OSCache etc...)

  • Help needed: triggering a combo box selection

    I'm new to creating forms in Acrobat (Acrobat 9 on Mac). I'm trying to create a form for my department where a student selects a faculty name from a combo box, and once the value is selected, another field is filled with an int value (course section number).
    Question: what is the correct trigger for executing the javascript for this? Mouse up seems to trigger too early and the others don't seem appropriate.
    I think my rudimentary JavaScript knowledge can get me far enough to check the value and the use a switch/if to prefill the int value in the other field, so the correct trigger is my current issue.
    Thanks in advance.

    I found where it's supposed to be stored, but I'm having some issues with missing ().  I'm using Acrobat X Pro for Windows Vista.  There was a post that I've spent the last 2 hours looking for that had a modified code that added in missing (), and now I can't find it   Any help would be greatly appreciated. Anyway, here's my code:
    function mater list for Alpha1()
    var oAlpha1 = {
    ACC: [
    ["-","None"], ["201",Intro to Financial Accounting], ["202",Intro to Managerial Accounting], ["-96",Selected Topics], ["-99",Directed Reading and Research]
    ANTH: [
    ["-","None"], ["151",Emerging Humanity], ["152",Culture and Humanity], ["210",Archaeology], ["215",Physical Anthropology], ["215L",Physical Anthropology Lab], ["310",Human Origins], ["313",Culture Through Film], ["321",World Archeology], ["342",Indigenous Peoples & Modernity], ["350",Pacific Islands Cultures], ["351",Culture Thought and Behavior], ["358",Myth, Symbol, and Ritual], ["362",Gender, Culture, and Society], "380",Field Archaeology], ["383",Museum Studies], ["384",Human Skeletal Biology], ["415",Human Ecological Adaptation], ["420",Culture & Communication], ["422",Magic Witchcraft & Supernatl], ["423",Social and Cultural Change], ["437",Pacific Archaeology], ["447",Polynesian Cultures], ["448",Micronesian Cultures], ["457",Okinawans Locally & Globally], ["458",Forensic Investigations], ["460",Adv Tech in Forensic Anth], ["474",Culture and Mental Illness], ["483",Archaeology of Hawaii], ["487",Philippine Culture], ["490",History & Theory Anthropology], ["495",Research Seminar], ["496",Selctd Tpcs:], ["499",Directed Reading & Research], ["296F",Intro to Field Archaeology], ["496A",Culture Through Film], ["496B",Phillipines Studies], ["496C",Museum Studies], ["496D",Okinawans Locally & Globally], ["496E",Pacific Island Cultures]
    APSC: [
    ["-","None"], ["486",Senior Project-Applied Sci], ["490",Senior Practicum], ["486C",Senior Project-CENT], ["486I",Senior Project-IT], ["486M",Senior Project-CULM], ["486R",Senior Project-RESP], ["490C",Admin Practicum-CENT], ["490I",Admin Practicum-IT], ["490M",Admin Practicum-CULM], ["490R",Admin Practicum-RESP]
    ASTR: [
    ["-","None"], ["110",Survey of Astronomy]
    It goes on like this through all our subjects.  I then modified the next bits of code in thomp's doc to reflect what I need to be pulled and populated:
    var nACCItems=oAlpha1["ACC"];
        var n201Title=ACCItems[1]; var n202Title=ACCItems[1]; var n-96Title=ACCItems[1]; var n-99Title=ACCItems[1];
    var nANTHItems=oAlpha1["ANTH"];
        var n151Title=ANTHItems[1]; var n152Title=ANTHItems[1]; var n210Title=ANTHItems[1]; var n215Title=ANTHItems[1]; var n215LTitle=ANTHItems[1]; var n310Title=ANTHItems[1]; var n313Title=ANTHItems[1]; var n321Title=ANTHItems[1]; var n342Title=ANTHItems[1]; var n350Title=ANTHItems[1]; var     n351Title=ANTHItems[1]; var n358Title=ANTHItems[1]; var n362Title=ANTHItems[1]; var n380Title=ANTHItems[1]; var n383Title=ANTHItems[1]; var n384Title=ANTHItems[1]; var n415Title=ANTHItems[1]; var n420Title=ANTHItems[1]; var n422Title=ANTHItems[1]; var n423Title=ANTHItems[1]; var n437Title=ANTHItems[1]; var n447Title=ANTHItems[1]; var n448Title=ANTHItems[1]; var n457Title=ANTHItems[1]; var n458Title=ANTHItems[1]; var n460Title=ANTHItems[1]; var n474Title=ANTHItems[1]; var n483Title=ANTHItems[1]; var n487Title=ANTHItems[1]; var n490Title=ANTHItems[1]; var n495Title=ANTHItems[1]; var n496Title=ANTHItems[1]; var n499Title=ANTHItems[1]; var n296FTitle=ANTHItems[1]; var n496ATitle=ANTHItems[1]; varn496BTitle=ANTHItems[1]; var n496CTitle=ANTHItems[1]; var n496DTitle=ANTHItems[1]; var n496ETitle=ANTHItems[1];
    var nAPSCItems=oAlpha1["APSC"];
    through all our subjects.  Do I need to leave the lists of var nSUBJItems and var nNUMTitle separate, or is the way I have them (subject followed by titles in each subject) okay?
    Then, I made the keystroke codes.  Do they go in the Document level as well, or do they go in the keystroke event or both?  Right now, I just have them as a doc level code because I can't save the document level code without fixing the () error.  I'd just like to know ahead of time.
    Number Keystroke Event
    function SetNumberEntries()
    if(event.willCommit)
    // Get the numbers list from the Master List
    // Since the selection is being committed,
    // event.value contains the Alpha1 name
    var lst = oAlpha1[event.value];
    // Clear the Number list if there are no numbers for the selected alpha
    if( (lst != null) && (lst.length > 0) )
    this.getField("NumberSelect").setItems(lst);
    else
    this.getField("NumberSelect").clearItems();
    // We have a new number list and the first entry is
    // is a non-selection, so clear the title field.
    this.getField("Title").value = 0;
    Uncommitted Keystroke Event
    function SetTitleValue()
    // In order to get easy access to the export value, i.e. Title. This
    // function needs to be run on the un-committed change event.
    // This field is set up for Commit on select so we know the value
    // will be committed anyway.
    if(!event.willCommit)
    // If the export value is Not written then
    // set the title to --.
    var nSelExp = --;
    if(!isNaN(event.changeEx))
    nSelExp = event.changeEx
    this.getField("Title").value = nSelExp;

  • 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

  • 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.

  • Combo box and Check box..help with code please?

    Here is my problem...i have a list of check boxes and according to which one is checked, i need combo boxes to populate different choices.
    as an easy example im only using 2 check boxes and two combo boxes.
    the check boxes are named Choice 1or2 with export values of 1 and 2
    the Combo Boxes are named List A and List B..
    both containing options that say you checked box 1 and you checked box 2
    any help would be greatly appreciated

    Implode wrote:
    "Help with code please."
    In the future, please use a meaningful subject. Given that you're posting here, it's kind of a given that you're looking for help with the code. The whole point of the subject is to give people a high level idea of what KIND of help with what KIND of code you need, so they can decide if they're interested and qualified to help.
    Exception in thread "main" java.lang.NumberFormatException: For input string: "fgg"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at assignment1.Game.Start(Game.java:120)
         at assignment1.RunGame.main(RunGame.java:18)This error message is telling you exactly what's wrong. At line 120 of Game.java, in the Start method (which should start with lowercase "s" to follow conventions, by the way), you're calling Integer.parseInt, but "fgg" is not a valid int.

Maybe you are looking for