Editable drop-down control???

hi,
How can i get editable drop-down control in my JSP page.
is it possible thr' java script or swings or something else???
plz help.
sam

This should do the trick. Just pass the value and the text as parameters to the function.
<html>
<body>
<form name="dropDownForm">
Value: <input type="text" name="optionText">
Text: <input type="text" name="optionValue">
<input type="button" value="Add option" onclick="addOption(document.dropDownForm.optionValue.value, document.dropDownForm.optionText.value)">
<br><br>
<select name="dropList"></select>
<script>
function addOption(value, text)
var position=document.dropDownForm.dropList.length;
document.dropDownForm.dropList.options[position]=new Option(value,text);
</script>
</form>
</body>
</html>

Similar Messages

  • Editable Drop-Down List

    Hello!
    I am using Dreamweaver's Editable Drop-Down List
    Application panel, Server Behaviors > + > Developer Toolbox > Form Controls > Editable Drop-down
    Which has been a GREAT option, but I need to add on 1 option, when I am about to ADD an item to the list, all you can do is add 1 item to 1 column in a database.
    Database Struture:
    listid   userid   listItem    listitemValue
    But all I can get it to update is listItem I need to be able to when the button, "ADD THIS" is pushed, that I can add a value to USERID also, is this possible? I tried diving deap into it, but some certains things I just didn't understand that far down.
    Any help would be greatly appreciated!
    Cheers, and thank you in advance.
    Justin

    Ok I completely misunderstood. Sorry for the confusion. I'm afraid I may not be much help on this particular function. Some functions I've really torn apart and modified, this is not one of them.
    This does not look like one of the more simple functions to change unlike some others,
    Before trying to go into lengthy info on how to break it down, is there any chance the info you are trying to update is some type of default name or incremental name, something than can be hard coded? ..or is it unique like a visitor, so you are pulling down each time? Ex:  User1, user2    vs.   sally101, david2009, etc.
    IF not, there are a several lines of variable setting and function modification to change at first glance.
    I can look into later, but the variables are not even in the same insert function page.
    Here is the Key line in WDG_recordsetInsert.php,
    $sql = 'INSERT INTO ' . $vars['table'] . ' (' . KT_escapeFieldName($vars['updatefield']) . ') VALUES (' . KT_escapeForSql($text, 'STRING_TYPE') . ')';
    but the vars appear to come out of an array in  'WDG_functions.inc.php : here is the function variables being set for the insert function above
    $WDG_sessInsTest = &$_SESSION['WDG_sessInsTest'];
         $WDG_sessInsTest[] = array(
              'conn' => $connectionName,
              'rsName' => $rsName,
              'table' => $sqlTable,
              'idfield' => $idField,
              'updatefield' => $updateField     );
    This array (at first glance) could be modified, but I can't promise that the vars will carry through because I don't see exactly where this array is being used again.
    As I mentioned, if the values you need are something you could hard code and increment, you could easily modify the 'insert to' function above.
    I would also toy around with some $_POST data and Session data vars and see if you can drop those straight into the sql statement above.
    Sorry I can't be more help on this one.

  • How do I get Watermark to show in the Edit drop down in LR 3.4?

    There is no Watermark function under the Edit drop down box in my Lightroom v 3.4  How do I get it to appear so I can use it?

    Yes my  system is Mac based, and I did locate a Watermark check box in the Print where I was able to install a watermark.  However when I open the  Edit drop box at the top, does not show a Watermark Edit selection.

  • Editable drop down do not show national characters

    Hi
    I'm using DW CS3 with Developer toolbox, PHP MySql.
    Problem is that Editable drop down show national characters wrongly.
    actually its inserts data in to database with wrong encoding.
    I use encoding "charset=utf-8", all other forms working fine.
    Only Editable drop down show [squares] instead Ä Ö Ü ...
    How i can do that Editable drop down will inserts data in utf-8 encoding?
    (like other forms and fields in my page)
    Thanks!

    Does it help if you disable hardware acceleration ?
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/

  • Editing Drop Down Menus in Contribute

    I have a client who is using contribute and wants to edit
    drop down menus. These drop down menus link to individual pdfs and
    she changes the names of the pdfs on a regular basis and wants to
    update these links in the drop down menus. The site was created in
    Dreamweaver. In role preferences of Contribute I turned on the
    allow unrestricted editiing which allows form elements to be
    edited. However I cannot figure out how to change the drop down
    menus. Is there any way to edit the drop down menus fields in
    Contribute?

    Create a SSI (with PHP f.i.), best in de root of the site,
    considering the way Contribute is handling linking.
    Call the file something like menu.inc.php.
    Provide your client with the url to menu.inc.php in the
    Bookmarks or explain the Choose-button in Contribute to open the
    file menu.inc.php.
    Keep the file simple (ul/li or p) .

  • How to modify the size of the editable drop down

    I have used the editable drop down list which works perfectly. The only problem i find is that it has a static width, unlike a regular select/option list that adjust according to the lengh of the data that is in it. Is there any way i can adjust the width of the editable drop down list. Thank you.

    try removing the width completely...leave that field blank

  • Put a editable drop down box on Adobe forms

    Hi All,
        I have created an Adobe form in that  I have to create an editable  drop down box for each line item in the table data.
    If anybody knows pls send those to me ASAP, it's an urgent requirement.
    Waiting for reply.
    Thanks.

    Hi
    Go through the link given below:
    Re: How to handle Drop Down Box on Interactive Adobe Form
    Do the following in your form Designer:
    1. Open the form.
    2. Select the Drop down list.
    3. Select Object Palette>Field.
    4. Their will be option list item.
    5. Click on the icon.
    6. Give the text below in the text area.
    7. Add as many items as you want.
    With Regards
    Nikunj Shah

  • Developer toolbox, Editable drop down encoding problem

    Hi
    I'm using DW CS3 with Developer toolbox, PHP MySql.
    Problem is that Editable drop down show national characters
    wrongly.
    actually its inserts data in to database with wrong encoding.
    I use encoding "charset=utf-8", all other forms working fine.
    Only Editable drop down show [squares] instead Ä Ö
    Ü ...
    How i can do that Editable drop down will inserts data in
    utf-8 encoding?
    (like other forms and fields in my page)
    Thanks!

    I already read that one (and a few others) but it never
    solved my
    problem, but perhaps it will help Markokiz
    Dooza skrev:
    > Maybe this will help:
    >
    http://dev.mysql.com/doc/refman/5.0/en/charset-server.html
    >
    > Steve
    >
    > kim wrote:
    >> Hi,
    >>
    >> I had a similar problem recently (not with tool box
    though) and I gave
    >> up using UTF-8 and went with charset=iso-8859-1
    instead. It seemed (in
    >> my case) that whenever data was being submitted from
    a page to the DB
    >> and then pulled back out I got the problem. I guess
    it's some setting
    >> in the MySQL but I just couldn't figure out where.
    This is only the
    >> case when I'm working with Danish characters. Maybe
    it could help you
    >> with your problem... maybe not.
    >>
    >> Markokiz skrev:
    >>> Hi
    >>> I'm using DW CS3 with Developer toolbox, PHP
    MySql.
    >>> Problem is that Editable drop down show national
    characters wrongly.
    >>> actually its inserts data in to database with
    wrong encoding.
    >>> I use encoding "charset=utf-8", all other forms
    working fine. Only
    >>> Editable drop down show [squares] instead ? ? ?
    >>> How i can do that Editable drop down will
    inserts data in utf-8
    >>> encoding? (like other forms and fields in my
    page)
    >>> Thanks!
    >>>
    >>>
    >>
    >
    Kim
    http://www.geekministry.com

  • Editable drop-down problem.

    Hello all,
    Here's the issue. I have an editable dropdown list/menu in a table. The table is hidden upon page load. When the user clicks the link to open the table, the editable drop down is only 1 or 2 pixels wide. How do I get the editable drop down to open at the prescribed 300px?
    Here's the code:
    <select name="CGSector1" id="CGSector1" wdg:subtype="DynamicInput" wdg:type="widget" wdg:recordset="rsCGSectors" wdg:displayfield="CGSectors" wdg:valuefield="CGSectors" wdg:norec="150" wdg:singleclickselect="yes" wdg:defaultoptiontext="no" wdg:restrict="No" wdg:ext="php" style="width:300px" wdg:fakeattribute="<?php WDG_registerRecordInsert("connStr_xxxxxx", "rsCGSectors", "CGSectors", "CGSectors");?>"></select>
    Thank you.
    Brian

    As this issue is not directly related to ADDT, but assumingly rather to e.g. aspects like the defined (if any) width of the initially hidden table, please give a link to the complete page code (or a live page) to help others with spotting the possible reason for this.
    However it should be mentioned that ADDT´s "editable dropdown" is generated on-the-fly using some proprietary AJAX functionality as well (including the style rendering), so maybe the style setting you defined here just gets ignored when the surrounding "container" (aka the table) gets hidden by - for instance - using features from another AJAX library like JQuery which is certainly incompatible with than ADDT´s own AJAX implementation.
    Cheers,
    Günter

  • Editable drop downs and safari

    Editable drop downs don't seem to show the "Add This" button in Safari on the Mac. It works in Firefox on the Mac and all Windows browsers. Does anyone have a fix for this?
    Thanks

    LMatts,
    This may be a CSS issue. You may have to edit the ADDT CSS. For testing purposes, try removing the CSS formatting from the HTML and see what displays. Remove the class="KT_tngtable" and class="KT_th from the table code that ADDT forms create and see what it looks like.
    Shane

  • Editable drop downs in sharepoint?

    Is there any way to create "editable" drop downs for a list in sharepoint? Meaning that if the value is not listed, the user can add it right away.
    Thanks,
    Carlos Roberto Vargas

    You mean a SharePoint list forms right?  In the settings for the choice column in the list settings there is an option that lets you specify whether your users can add their own choices.  Enabling this will allow users to add their own
    terms.
    Or you can set the choice column as a look-up list and let them add additional options to the look-up column.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Edit drop down list in SHD0(transaction variant)

    Hello all,
    How can we control the values displayed in drop doen list using transaction variant? i am using SHD0 to create a transaction variant and want only few values to be dispayed in drop down list instead of all the values in orignal transaction.
    Thanks
    Arjun

    As far as I konw, you can not.
    You can edit the properties (Visible/Invisible, etc ) but not restrict the values originally displayed.
    Regards

  • A custom view in the Edit drop-down

    Hi,
    How could I create a custom view and add it to the Edit List Item drop-down in SharePoint 2013? This screenshot shows what I mean in SharePoint 2010:
    I'd like to have a menu item Custom View below Edit Properties in the drop-down list. When the user clicks the item I'd like to redirect to my layout page.
    Thanks,
    Leszek
    Wiki: wbswiki.com

    Hi ata6502:
    Adding a user custom action for list items
    using System;
    using Microsoft.SharePoint.Client;
    namespace Microsoft.SDK.SharePointServices.Samples
    class CreateUserCustomActionList
    static void Main()
    string urlWebsite = "http://MyServer/sites/MySiteCollection";
    ClientContext clientContext = new ClientContext(urlWebsite);
    Web oWebsite = clientContext.Web;
    List oList = oWebsite.Lists.GetByTitle("My List");
    UserCustomActionCollection collUserCustomAction = oList.UserCustomActions;
    UserCustomAction oUserCustomAction = collUserCustomAction.Add();
    oUserCustomAction.Location = "EditControlBlock";
    oUserCustomAction.Sequence = 100;
    oUserCustomAction.Title = "My First User Custom Action";
    oUserCustomAction.Url = urlWebsite + @"/_layouts/MyPage.aspx";
    oUserCustomAction.Update();
    clientContext.Load(oList,
    list => list.UserCustomActions);
    clientContext.ExecuteQuery();
    Modifying a user custom action
    using System;
    using Microsoft.SharePoint.Client;
    namespace Microsoft.SDK.SharePointServices.Samples
    class ModifyUserCustomAction
    static void Main()
    string urlWebsite = "http://MyServer/sites/SiteCollection";
    ClientContext clientContext = new ClientContext(urlWebsite);
    Web oWebsite = clientContext.Web;
    List oList = oWebsite.Lists.GetByTitle("My List");
    UserCustomActionCollection collUserCustomAction = oList.UserCustomActions;
    clientContext.Load(collUserCustomAction,
    userCustomActions => userCustomActions.Include(
    userCustomAction => userCustomAction.Title));
    clientContext.ExecuteQuery();
    foreach (UserCustomAction oUserCustomAction in collUserCustomAction)
    if (oUserCustomAction.Title == "My First User Custom Action")
    oUserCustomAction.ImageUrl = "http://MyServer/_layouts/images/MyIcon.png";
    oUserCustomAction.Update();
    clientContext.ExecuteQuery();

  • Editable Drop down in ALV

    Hi,
    I am working on the ALV report using objects (custom container
    and cl_gui_alv_grid).
    I have a drop down editable field in the alv. How can i capture the
    selected values in the dropdowns for all rows when a button is clicked on appln tool bar.
    Thanks,
    Prasad

    Hi,
    Refer demo programs:-
    BCALV_EDIT_06 --                 Dropdown Listbox at Column Level
    BCALV_EDIT_07 --                 Dropdown Listbox at Cell Level
    Also you can refer:-
    Alv Drop down filling
    Hope this helps you.
    Regards,
    Tarun

  • How to edit drop down menus in Contribute?

    When I get to a page on my site with drop down (or jump) menus, there doesn't seem to be any way of editing these in Contribute. Anyone know how to do this?

    Hi,
         If you have used Spry widgets (like Menu bar widget), then, you can edit the menus within Contribute CS5 itself. But if you are using any other way like a script based or 'form action' then, within Contribute you cannot edit such menus. You can choose to edit such web pages in an external application (like Dreamweaver, Textpad, or Notepad) by clicking Ctrl+Shift+E, and the web page will be opened in that editor. You can make changes there, save it, and publish the web page in Contribute.
    Hope this helps.

Maybe you are looking for

  • How do you remove a symbol from the stage in Edge animate?

    Hello- I'm wondering how to remove a symbol from the stage in Edge Animate so you can jump to another place in the timeline.  In Flash, the symbol was only on the stage for the amount of frames you indicated.  Not sure how it works here. For example,

  • IPhoto file creation date inconsistencies during drag and drop

    I have noticed that if I drag and drop a photo from iPhoto to Finder, the file creation dates in Finder are inconsistent. (This question is related to drag and drop only and not File->Export, which always uses the export date and timestamp for the fi

  • Career scope for SAP HCM

    Hi All, Greetings, I am a BMS graduate and have finished my PGDBA in HRM. I have over 4 years of experience in Recruitment Industry. Now i am planning to get training and certification done in SAP HCM. Please let me know certain things about it: 1. S

  • Bluetooth for MBP with Windows 7 x32

    Hello, I have a mid 2012 MBP with a bootcamp 4.0 partition with 32 bit Windows 7 on it. Everything worked perfectly right from the time of installation except bluetooth. I am trying to connect to my Rocketfish bluetooth headphones. The OSX sides conn

  • How long LDAP update changes in Jabber4W client

    Hi. My query is if I change my telephone number in Active Directory, it doesn't flow through to the Jabber client, unless I shut the client down, and reopen. Fellow collegues still see the old telephone number until they do the same. We are on 9.2.1,