Why won't my drop down list populate from the array?

I am using the following array. 
var actDesc = new Array(" ",
"Desc1 ",
"Desc2 ",
"Desc3 ");
// Array of HUD Activity Numbers.
var actNum = new Array(null,
"1 ",
"2 ",
"3 ");
// This populates the Description Drop-down List and works just fine.
function populateActDesc(dropdownField)
      var i;
      for (i=0; i < actDesc.length; i++)
         dropdownField.addItem(actDesc[i]);
//This is supposed to populate the Description Number Drop-down List but doesn't work.
function populateActNum(dropdownField)
      var i;
      for (i=0; i < actNum.length; i++)
         dropdownField.addItem(actNum[i]);
// Populates another field based on the Description Field value chosen and works as intended.
function getDesc(hudActivityDescription, hudActivityNumberField)
   var i;
   for (i = 0; i < actDesc.length; i++)                
      if (actDesc[i] == hudActivityDescription)        
        hudActivityNumberField.rawValue = actNum[i];        
   break;               
I placed the following into the drop-down list object holding the actDesc array (Event: initialize; Language: javascript):
actNoScript.populateActDesc(this);
This works just fine.
I placed the following into the drop-down list object holding the actNum array (Event: initialize; Language: javascript):
actNoScript.populateActNum(this);
This doesn't work.  Any ideas?
Any help would be greatly appreciated.  I am using LCD 8.2 ES on Vista 32bit.
Thanks,
Jerald

Hi Jerald,
You can't assign null to the display value of a drop down control.  If you change the HUD activity number array to remove the null it should work. 
That is;
// Array of HUD Activity Numbers.
var actNum = new Array("  ","1 ","2 ","3 ");
Bruce

Similar Messages

  • Drop Down List Box from an Array?

    I have an array - a lovely little 1-dimensional array of customer last names - that I want to display in a drop down list box so my user can begin to type a value in that list box and CF will bring up the matching entry.
    I have tried cfloop and cfselect, but haven't had any success. Once the user clicks on a name, I want to be able to take that value and do some other processing.
      Any suggestions?

    No Ajax - CF is a ***** enough as it is.
    OK - I see where you started to go with your link, but lost you somewhere in Step 2.
    I like the idea of a master query with sub queries off of it (Queries of Queries).  Here's what I got so far:
    <cfquery 
    name = "MasterMemberQuery" datasource = "cfissues">
            SELECT *  FROM Members  
            ORDER BY LastName</cfquery>
      <cfquery  name = "LastNameQry" dbtype = "query">
         SELECT MemberID, LastName  
         FROM MasterMemberQuery  
        ORDER BY LastName</cfquery>
    This worked perfectly - nice cfselect to display the last names - just like before.  However, I still cannot capture the user's choice from the cfselect statement:
    <cfform> 
          <cfselect name = "ChosenLastName"  
                        query = "LastNameQry"  
                        value = "MemberID"  
                        display = "LastName"  
                        size = "1">  
         </cfselect>
         <cfoutput>
                   The chosen MemberID = '#LastNameQry.MemberID#'
         </cfoutput>
    </cfform>
    The name "ChosenLastName" is always labelled as invalid, and the cfoutput always gives the MemberID of the first entry in the LastNameQry, never the user's choice. 
    I need to take the user's choice of last name, capturing the MemberID (the value attribue of the cfselect) and read the MasterMemberQuery to get just the single member's data.
    And is it me or does this forum's site run at about 300 baud?????

  • Why won't my drop down list display on hover?

    I am currently implementing a drop down navigation list to an existing navigation bar. This uses very basic html with only ul and li elements. Below is a link to the page, as well as a snippet of the HTML code and CSS that supports it.
    http://derektoigo.com/assets/livesites/DJDKMedia/features.html
    The problem that I am having occurs when hovering over the Features link in my navigation bar. I am trying to display the items that are shown below in the format of a vertical list, but the bigger problem is that even though I am hovering over the parent CSS item and it says to display:block, essentially causing it to hover so I can click, I can't do so. I'm trying to find a way to make the menu stay in place once I move my mouse away from the original item. Please note that none of the other pages support this functionality yet and will contain different code.
    For the record, I am using the Suckerfish drop down and I am following this tutorial: http://www.alistapart.com/articles/dropdowns  I stopped just before proceeding with the IE fixes, titled as "Hold on a minute!"
    If anyone can point out what I'm doing wrong, I'd be most appreciative for the fix. Thanks to all for your help.
    HTML Structure
    <div id="headerFullwidth">
        <div id="header" class="container">
            <img src="images/logo.png" alt="DJDK Media" />
            <ul id="navigation">
                <li><a href="index.html">Home</a></li>
                <li><a href="features.html">Features</a>
                     <ul>
                      <li><a href="index.html">Home</a></li>
                      <li><a href="features.html">Features</a></li>
                      <li><a href="services.html">Services</a></li>
                      <li><a href="portfolio.html">Portfolio</a></li>
                      <li><a href="about.html">About</a></li>
                      <li><a href="contact.php">Contact</a></li>
                    </ul>
                </li>
                <li><a href="services.html">Services</a></li>
                <li><a href="portfolio.html">Portfolio</a></li>
                <li><a href="about.html">About</a></li>
                <li class="last"><a href="contact.php">Contact</a></li>
            </ul>
        </div><!--end header-->
    </div><!--end headerFullwidth-->
    CSS
    #header ul {
    float:right;
    margin-top:20px;
    margin-right:-22px;
    background-color:none;
    list-style-type:none;
    #header ul li {
    float:left;
    padding-left:22px;
    padding-right:22px;
    background:url(../images/navigation-divider-background.jpg);
    background-position:right;
    background-repeat:no-repeat;
    line-height:30px;
    li ul {
    display: none;
    position: absolute;
    top: 1em;
    left: 0;
    li > ul {
    top: auto;
    left: auto;
    li:hover ul {
    display: block;
    li:hover ul li {
    background:none;
    display:block;
    margin:0px;
    padding:0px;    
    #header ul li:hover {
    float:left;
    padding-left:22px;
    padding-right:22px;
    background:url(../images/navigation-divider-background.jpg);
    background-color:#323232;
    background-position:right;
    background-repeat:no-repeat;
    line-height:30px;
    #header ul li a {
    color:#fff;
    font-size:14px;
    #header ul li a:hover {
    color:#6d6d6d;    

    Try pasting this into a new, blank HTML document
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>CSS Horizontal Drop-Menu</title>
    <style type="text/css">
    /**GENERAL**/
    body{
    font:1em/100% Verdana, Arial, Helvetica, sans-serif;
    background:#666;
    margin:0px;
    padding:0px;
    text-align:center;
    /**IE ONLY**/
    *body {font-size:76%}
    #container{
    width:970px;
    margin: 0 auto; /**centered**/
    padding: 12px;
    border: 4px solid silver;
    background: #FFF;
    #header {
    width: 960px;
    margin: 0 auto;
    border: 1px solid green;
    /* Horizontal Drop-Menu */
    ul #navbar {
    width: 100%;
    margin: 0 auto; /**centered**/
    text-align:center; /**centers older browsers**/
    padding: 0;
    font-size: 14px;
    height: 1em;
    #navbar li {
    list-style: none;
    float:left;
    /**top level menu**/
    #navbar li a {
    display: block;
    text-decoration: none;
    color: #444;
    width: 8em;
    padding: 10px;
    border-left: 1px solid #fff;
    border-top: 1px solid #fff;
    border-right: 1px solid #aaa;
    background-color: #DDD;
    #navbar li a:hover {
    background: #666;
    color: #FFF;
    /**sub-menu**/
    #navbar li ul {
    display: none;
    width: 8em; /* Width to help Opera out */
    background-color: #999;}
    /**help for IE6 JavaScript**/
    #navbar li:hover ul,
    #navbar li.hover ul {
    display: block;
    position: absolute;
    margin: 0;
    padding: 0;
    #navbar li:hover li,
    #navbar li.hover li {
    float: none;}
    #navbar li:hover li a,
    #navbar li.hover li a {
    background-color: #999;
    border-bottom: 1px solid #FFF;
    color: #FFF;}
    #navbar li li a:hover {background-color: #666;}
    /**end Drop-menus**/
    /**clear menu floats after ul**/
    .clearing {clear:both; height: 1px; visibility: hidden;}
    </style>
    <script type="text/javascript">
    //Script to make drop-menus work in IE6/
    //<!--[CDATA[
    sfHover = function() {
    var sfEls = document.getElementById("navbar").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
    this.className+=" hover";
    sfEls[i].onmouseout=function() {
    this.className=this.className.replace(new RegExp(" hover\\b"), "");
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //]]-->
    </script>
    </head>
    <body>
    <div id="container">
    <div id="header">
    <h3>CSS Horizontal Drop-Menu</h3>
    <!--Begin Horizontal navbar-->
    <ul id="navbar">
    <li><a href="#">Item One</a></li>
    <li><a href="#">Item Two</a></li>
    <li><a href="#">Item Three &gt; </a><ul><li>
    <a href="#">Subitem 1</a></li><li>
    <a href="#">Subitem 2</a></li><li>
    <a href="#">Subitem 3</a></li></ul>
    </li>
    <li><a href="#">Item Four</a></li>
    <li><a href="#">Item Five &gt; </a><ul><li>
    <a href="#">Subitem 1</a></li><li>
    <a href="#">Subitem 2</a></li></ul>
    </li>
    <li><a href="#">Item Six &gt; </a><ul><li>
    <a href="#">Subitem 1</a></li><li>
    <a href="#">Subitem 2</a></li></ul>
    </li>
    </ul> 
    <!--end navbar -->
    <!--IMPORTANT! clear floats with a p, br, or hr class -->
    <hr class="clearing" />
    </div> <!--end header -->
    </div>  <!--end container -->
    </body>
    </html>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Drop down list button in the WDP Abap interactive form

    Hi Gurus,
    I wanted to implement the drop down list button in the WDP Abap interactive form. Once the users clicks on the drop down button, an RFC should be called and display the details under the drop down button. Please give me the logic with code. Its very urgent...please help me. Please note that it is in WDP Abap interactive forms. We are using NW2004S, ECC6.0.

    hi david,
    all the UI elements in the adobe form are generally connected to your web-dynpro Context.
    whatever you type in the online adobe form is reflected in the respective context attributes of the dynpro Context of the view where "ur Interactive form UI element is".
    that means you can yourself fill the contents of ur interactive form by working on the get/set methods of the context attributes.
    Likewise you can clear the form by setting all context attributes to blank eg ""
    with regards,
    -Amol Gupta

  • Drop-down list, over riding the entry?

    Hello,
    I am developing an VISITOR Adobe Interactive Form, i have Designer 8.1 and Reader 9.0 in my Windows 7 Laptop. When i checked the menu EDIT-->form properties --> Compatability, its Adobe XML form File (XDP)
    When i opened this VISITOR interactive form in a browser, right clicking and checked form PROPERTIES, then i saw the "PDF Version: 1.6 (Acrobat 7.x)"
    I have a bunch of drop-downs in my interactive form, done by dragging & dropiing the 'Drop-down list' object, at the end i binded it with some data source, working fine, say its COUNTRY list.
    As soon as use opened the form, he saw the 'USA' prepopulated in the drop-down field, fine.
    User dropped down the entries, he saw a couple, like USA, Canada, UK, Spain, fine.
    But, now user want to enter / override this USA entry with his own value, like FRANCE, but, my form is not allowing, its behaving like a 'readOnly' field!
    Pls. let me know how to over ride a entry of drop-down values, as per user wanting value?

    If I understand your issue properly, then I think what you need to do is
    check the "Allow Custom Text Entry" box on the FIELD page of the OBJECT
    palette. It can be found under the area where you define the list items in
    your drop down list.
    I hope this helps

  • How to change the drop down list "Category" in the Risk page (PWA 2013)

    Hello,
    How to change the drop down list "Category" in the Risk page of a Project Site. I need to change the list of elements.
    Thanks

    Hi Robert,
    You actually cannot edit the current template.
    The process is as follow: 
    create a brand new project site from the existing template,
    edit the site configuration (list, column, webparts, image, logo, theme...),
    save it as a template,
    associate it to an EPT.
    See reference below:
    http://blogs.msdn.com/b/brismith/archive/2010/03/15/customizing-the-project-site-in-project-server-2010.aspx
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Is there a way to filter a drop down list by using the result main data display from"GetUserProfileByName" when open the form.

    Hi 
    Is there a way to filter a drop down list by using the result main data display from"GetUserProfileByName" when open the form?
    The second source has a huge list of company names that can be narrrow by email work. 
    background:SP 2010 and Infopath 2010
    CRISTINA&amp MICROSOFT Forum

    I'm not sure if I understood your question clearly but here is a good resource on how to get attributes from "GetUserProfileByName" web services:
    http://blog.mangroveweb.com/pre-populating-an-infopath-from-with-mysql-data-using-a-net-web-service/using-sharepoints-getuserprofilebyname-web-service-to-retrieve-ad-account-information/
    Regarding filtering dropdown list then this could be done by applying form on-load rules. 
    Hope this helps

  • Why won't they accept my serial number from the photoshop Elements box I just bought from Costco?

    Why won't they accept my serial number from the Photoshop Elements box I just bought from Costco?

    It may be a redemption code Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • PO drop down list populates with "Delivery Completed" POs

    All,
    I have seen the following issue: When the supplier creates an ASN manually and is requested to populate the Purchase Order field, the drop down list displays "Open" Purchase Orders as well as "Delivery Completed" ones, which is very confusing.  Do you happen to know how I can ensure that the supplier only has the choice to select from "Open" Purchase Orders when creating a new ASN?
    Thank you for your help!
    Johanna

    If a particular email address will only be associated with a single office, then one thing you can do is set the export value of the items in the combo box to the corresponding email addresses. The email address will be the value of the field when you retrive it with JavaScript.
    To submit to a particular email address, it would be best to use the mailDoc method, which is documented here: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.505.html
    This is best because it allows you to reliably customize all the the email properties like recipients, subject, body, etc.
    The code for getting the value of the comob box would look something like this:
    // Get the email address from the combo box named "combo1"
    var sTo = getField("combo1").value;
    If more than one office will have the same email address associated with it, post again and I can refer you to other posts that discuss this situation. You would have to use a similar approach if you do not want to set the export values of the items to the email addresses for some reason.
    The alternative is to use the submitForm JavaScript method, but specifying the subject and body text is less reliable and more complicated.
    If you need more help, post again.

  • How do I use one drop down list to refresh the list in another drop down?

    I am using a drop down list full of years (i.e. 2008, 2009..etc). When I make my selection from this drop down list (say for instance I select 2009) I want it to update the available data in the second drop down list. I have the query statement set up within the JSP page but it needs to be a dynamic SQL statement based off the value I selected in the first drop down.
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    The variable "year" is the value I need to figure out how to assign. Now this variable is a Java variable (attribute) and Im unsure how to get the value from the previous drop down and assign it to that. Basically I need the JavaScript value from the first drop down assigned to the Java attribute "year".
    Anyone able to help me with this???
    Thanks,
    Jed

    Here are my two drop down lists. As you can see I build the second list dynamically based off the value of the year. I want to be able to assign my year to the value I select in this first drop down. How do I do that?? I only want to show games for the year I select. I currently have the year hardcoded to "2009" as you see below. How can i change that to be assigned to the JavaScript value i extract from the first select box?
    <select name="season">
    <option value='2009' selected>2009</option>
    <option value='2008'>2008</option>
    </select>
    <select name="gameselect">
    <%
    try
    String year = "2009";
    String connectionURL = "jdbc:mysql://localhost:3306/ElmwoodExpos";
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection(connectionURL, "root", "thejedster");
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs = s.getResultSet();
    while(rs.next())
    %>
    <option value="1"><% out.print(rs.getString("GameDescription"));%></option>
    <%
    catch(Exception e)
    %>
    </select>
    Thanks,
    Jed

  • How do you make the sentences you input in a drop down list wrap to the next line?

    How do you make the sentences that you input in a drop down list to wrap to the next line?

    You can't.
    see this thread for more info:  Can you set drop down list as multi-line???

  • How do I get the location bar drop-down list to show the most recently visited page at the top? I have no idea how it's deciding what to display.

    In IE when you show the drop-down list from the location bar, it show you all of your most recently visited pages in descending order with the most recent at the top. Firefox is showing me a list that I have no idea where it's getting the pages from or how it's ordering them. It doesn't update the pages or the order when I go to a new page. I have recently switched from IE to Firefox and cannot figure out how to get Firefox to do this; very annoying.

    That drop down list doesn't show recently visited pages, but shows list list of most visited sites sorted by what the Mozilla devs call frecency (frequency and recency) and is based on bonus points. It is not possible to have much influence on what shows on that list.
    If you want a list of recently visited sites then you can use a smart bookmark e.g. on the Bookmarks Toolbar with the location set to this smart folder.<br />
    Name: <b>Recently Visited</b><br />
    Location: <b>place:queryType=0&sort=4&maxResults=30</b><br />
    You need to close and restart Firefox to make that folder work as intended.
    * https://support.mozilla.org/kb/Smart+Bookmarks+folders
    See also:
    * http://developer.mozilla.org/en/The_Places_frecency_algorithm
    * http://kb.mozillazine.org/places.frecency.numVisits

  • Adding Drop Down List values from table fields

    Hi all,
    Recently we have switched from Microsoft's Infopath to Adobe's LiveCycle Designer.  In InfoPath i was able to allow a user to enter data in a table and then use that data as values for a drop downlist, which could in turn be used in another table.  Infopath made it relatively easy to do this, but I assume it requires scripting in LiveCycle.  Here is an example that make make it easier to to explain:
    Let's say we have a form with a table that has a colomn where the user can enter a value in a table let's say "Computer Name":
    Computer Name | IP | Vendor | Serial Number|
    PC 1
    ---------------------| 192.168.2.34| HP | US4839494
    PC 2
    PC 3
    PC 4
    Further down the form there is a nother table with a drop down list.  I want the values of the drop down list to be what ever values were entered for "Computer Name" in the previous table.  So in this case the table would look like this:
    Computer Name | Acquisition Date| End of Life Date
    <Drop DownList>|  07/21/2010 | 07/21/2014
    The drop downlist values would be "PC1, PC2, PC3, PC4"  or whatever values were entered in the previous table.  Essentially, I am trying to avoid from having users type in "Computer Name" data every time the "Computer Name" needs to be entered.  It would be so much easier to enter all "Computer Name" values and then use those values as part of a drop down list to avoid excessive typing.
    I hope this makes sense, it is fairly easy to do in InfoPath and I am sure there is a way to do this in LiveCycle.
    Let me know if my explanation is not clear enough.
    Thanks!

    Thanks for the feedback, but it doesn't seem to quite accomplish what I am trying to do. I've tried using global binding as you specified, but the outcome is not exactly what I want.  Perhaps this drawing can help depict what I am trying to do:
    http://imageshack.us/photo/my-images/153/dropdownlist.png/
    On the picture I manually defined the values for the drop down list.  Again, I want these values to be taken from "Computer Name" in the table above.
    Thanks!

  • Populating 2nd drop down list based on the selection of the first using Access DB...

    I have a form that I would like to have the user select the first drop-down list as populated from a data source, but them have the subsequent selection choice dependent on the first. For instance, if they select "administration" for their division, the department numbers shown in the second box would only contain those with "Administration" listed as their division. I have all of this information in my Access table.
    I've seen this possible by storing all of the information in a script. i.e.- listing each division and department. The only problem is that we have over 300 departments and making any changes would be very tedious in an in-form script. Is there any way to have this automatically reference a table in Access?
    Thank you,
    Mike

    In the current version of the portal, it is not possible as you cannot do code-behind on postbacks. If you want more flexibility, you need to write your own front-end that uses the FIM Service webservices...
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • Refresh the drop down list after update the table

    I have tab with three pages in each page one data block. I have table with primary key of combination of the other tables foreign key. I am populating the combination of foreign key in dorp down list. In the when-new-form-instance trigger I populate the two lists, work fine. But if I add a new record in the other tables and I need this one to display in the list. I am trying to execute the same procedure which is populate the list
    First time I get this error. FRM-41337. How can refresh the list to display the new record as well.
    Thanks in advance
    null

    Hellow Tamer
    What you wanna do is to display the element entered in the List after you have added it manualy.
    I think you must re-populate the Recordgroup
    again.
    The Procedure you used to populate the RecordGroup in the When-new-Form-Instance,
    must include the statement:
    DELETE_GROUP()
    like This:
    PROCEDURE Populate_The_List(list_id ITEM, sql_stat VARCHAR2) IS
    group_id RecordGroup;
    outcome NUMBER;
    BEGIN
    --Create temporary record group.
    group_id := CREATE_GROUP_FROM_QUERY('List_Elements', sql_stat);
    IF ID_NULL(group_id) THEN
    MESSAGE('Record Group could not be created in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate record group.
    outcome := POPULATE_GROUP(group_id);
    IF outcome <> 0 THEN
    MESSAGE('Record Group could not be populated in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate list item
    POPULATE_LIST(list_id, group_id);
    --Destroy the temporary record group to release resources
    DELETE_GROUP(group_id);
    EXCEPTION
    WHEN OTHERS THEN
    MESSAGE('Internal error occurred in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END Populate_the_List;
    SQL_STAT refers to the SQL statement used further to populate the List.
    Hope this Helps
    Regards
    Tariq

Maybe you are looking for

  • Photoshop CS2 launch problem

    Most of the time I attempt to launch Photoshop CS2 it fails. I have to try 2 or 3 times before it's successful. I've put a new alias in my dock and still have the same problem. It's ok when I double click on the icon in the application folder. I've r

  • Unable to Deploy application in NWDS 7.1

    Hi All, I have created a web dynpro application in NWDS 7.1 .I have even maintained the JAVA server settings under Windows->Preferences-> SAP AS JAVA by mentioning the Instance Host and the Instance number. When i try to deploy , i am getting the fol

  • Will all the songs on my ipod be wiped off if my itunes is now empty?

    My lap top's hard drive crashed and i've lost all the data that was ever stored on it, including all my music and itunes. i've since reinstalled itunes but obviously have no music within it. if i reconnect my ipod which currently has all my old music

  • RoboHelp Server Service Crashing

    At random times, sometimes hours, sometimes days apart, the RoboHelp Server Service stops and our server is therefore down. We are running on Windows 2003 Server. I am using internally created databases instead of SQL. What could be the cause of this

  • IBAN field is put automatically for XK01 and XK02 BDC

    Hi, BDCDATA table is created with below records to update the bank details of vendor but the BDC updates the IBAN automatically even though its not a part of BDC how can this be prevented ? I even tried std funciton module DELETE_IBAN to delete the a