Expand select dropdownlist

I am trying to expand a open dropdownlist upon clicking on a statictext.
var w = new Window ("dialog");
var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
var g0 = w.add("group {orientation: 'row', alignChildren: ['fill', 'fill'], margins: 0}");
var lbCategoryCodes1 = g0.add("dropdownlist", undefined, ["test 1", "testerterg"]);
b = w.add('button', undefined, "OK");
ss1.addEventListener('mousedown', function(kev)
    var event = ScriptUI.events.createEvent('MouseEvent');
    event.initMouseEvent('mousedown', true, true, w);
    lbCategoryCodes1.dispatchEvent(event);
  },false/*==bubble*/);
w.show();
Does not work.
How do I?

withoutdix,
I hope, I understood you right.
Do you want to do something like this?
var w = new Window ("dialog");
var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
var lbCategoryCodes1 = w.add("dropdownlist", undefined, ["test 1", "testerterg"]);
lbCategoryCodes1.selection = 0;
var item = lbCategoryCodes1.selection;
b = w.add('button', undefined, "OK");
lbCategoryCodes1.onChange = function () {
    item = lbCategoryCodes1.selection;
    return item;
w.show();
try {
    alert(item);
catch (e) {}
Have fun
Otherwise see Peter Kahrels Script-ui.pdf for more details.

Similar Messages

  • In edit mode in gridview everytime ihave to select dropdownlist otherwise its store first value

    <asp:GridViewID="GVTrouserJobWork"runat="server"  
    AutoGenerateColumns="False"CssClass="Gridview"HeaderStyle-BackColor="#4B6D9D
    "DataKeyNames="TrouserJobID"
    OnRowCancelingEdit="GVTrouserJobWork_RowCancelingEdit"OnRowDeleting="GVTrouserJobWork_RowDeleting"
    OnRowEditing="GVTrouserJobWork_RowEditing"OnRowUpdating="GVTrouserJobWork_RowUpdating">
    <Columns>
    <asp:TemplateFieldHeaderText="StyleNo"
    <asp:LabelID="lblStyleNo"runat="server"Text='<%#Eval("StyleNo")
    %>'/>
    <asp:DropDownList Width="60px"  DataSource='<%# GetStyleNo() %>' DataTextField="StyleNo"
                                        DataValueField="StyleNo" ID="StyleNo"
    runat="server">
                                    </asp:DropDownList>
    </EditItemTemplate>
    <ItemTemplate>
    <asp:LabelID="lblStyleNo1"runat="server"Text='<%#Eval("StyleNo")
    %>'/>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    public
    DataSetGetStyleNo() {
    SqlConnectionmyConnection =
    newSqlConnection(ConfigurationManager.ConnectionStrings["constring"].ToString());
    SqlCommandcmd =
    newSqlCommand();
                    cmd.Connection = con;
                    cmd.CommandText =
    "StleMasterList";
                    cmd.CommandType =
    CommandType.StoredProcedure;
    SqlDataAdapterad =
    newSqlDataAdapter("StleMasterList",
    myConnection);
    //SelectDDCompanyName
    DataSetds =
    newDataSet();
                    ad.Fill(ds,
    "StleMasterList");
    return
    ds;
    StleMasterList = Select StyleNo from Stylemaster
    protectedvoid
    GVTrouserJobWork_RowUpdating(objectsender,
    GridViewUpdateEventArgse)
    intTrouserOrderID =
    Convert.ToInt32(GVTrouserOrderDetail.DataKeys[e.RowIndex].Value.ToString());
    DropDownListStyleNo = (DropDownList)GVTrouserOrderDetail.Rows[e.RowIndex].FindControl("StyleNo");
    SqlCommandcmd =
    newSqlCommand("update
    TrouserOrders set StyleNo='"+
    StyleNo.SelectedValue.ToString() + "'where
    TrouserOrderID="+ TrouserOrderID, con);
     cmd.ExecuteNonQuery();
     con.Close();
    lblresult.ForeColor =Color.Green;
    lblresult.Text = " Details Updated successfully";
    GVTrouserOrderDetail.EditIndex = -1;
    BindTrouserOrderDetails();
    Actually I get dropdown in editmode but when without selecting dropdownlist if I update it it select first value of dropdown list.
    if have two dropdownlist in gridview and I want to update only one I cant do this every time I have to select both
    dropdownlist .

    Hello Fresherss,
    I think the ASP.NET forum will be more suitable for this thread:
    http://forums.asp.net/
    There are ASP.NET experts who will help you better.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Expanded Selection Criteria in Document Printing Form

    Hello
    It would be helpfull to have the Expanded Selection Criteria option similar to this function implemented in the Documentation Generation Wizard or the Pick and Pack Manager in version 8.82.
    On this way it would be possible to set further limitations for mass printing of documents according to already defined criterias (default and user defined fields).
    Best regards

    Hi,
    You may check here: https://cw.sdn.sap.com/cw/community/ideas/sme/b1
    Thanks,
    Gordon

  • How to Build an Auto-Expanding Select list

    Hi everyone,
    I want to know if it's possible How to Build an Auto-Expanding Select list ?
    I saw some discussions which tell us to use Jquery to acheive this. Is it the only solution ?
    I want a solution that it is easy to implement.
    Thanks in advance. Bye.

    Hi,
    Not sure what you've seen before, but anywhoo:
    In my select list, i set element attributes of :
    style="min-width: 130px"Just because some of the smaller values were getting truncated.
    Then I add this onload javascript code:
    $('#P10_AUTO_EXPANDING').change(function(){
      $(this).width($('option:selected', this).text().length*10)
    })It's not perfect for getting the right size (i.e. i think it increases exponentially, but you can play around with the multiplier)
    Which you can see: http://apex.oracle.com/pls/apex/f?p=45448:10:
    Edited by: trent on Dec 15, 2011 10:35 AM
    Probably best to add this line of code:
    $(this).width($('option:selected', this).text().length*10)
    into a dynamic action for a change event of the item, of which the true action is to execute javascript code.

  • Expand selection in FI_GL_4 extractor.

    Hi
    I would like to expand two fields that are not open for selection, which would be best to do this?
    Thanks
    Rafael Fassoli SAP-BR

    Hi Rafael,
    Please go through the below process to make them available for selection.
    Se11:
        Data source table ROOSFIELD
            Contents
                Data source OLTP source
                      Execute
                           /H (check at selection if it is M means it is changed & p means not yet changed)
                                 Double click on the field u want to activate
                                       F7
                                            Double click on IF CODE
                                                   Deleat show & place Edit
                                                              Save
                                                                      F7
                                                                            Enter
                                                                                    F8
                                                                                    Selection M
    Hope this helps.
    Veerendra.

  • Chained Spry Selects/Dropdownlist

    Hi
    I would like to set up a Triple linked dropdownlist using the Spry Validation Select Insert using Dreamweaver CS4.
    Is there fairly simple solution to this??
    While searching for a solution to this i have read comments about data sets??? and xml???
    Please help!!!
    Many Thanks

    You want to search for Dependent Drop Down Menus. There are loads of different javascript solutions, but not sure how many will work with
    Spry.
    Steve

  • How to get textbox text inside Repeater based on specific row dropdownlist selection using JavaScript

    Hi All,
    I have dropdownlist and textbox controls inside repeater control. Suppose when i select specific dropdownlist i want get the value of selected item and mean while i want to get the textbox text which in the same row.
    <script type="text/javascript">
    var ddlType;
    function ddl(ddl) {
    ddlType = ddl.value;
    alert(ddlType);
    </script>
    <asp:Repeater ID="RepterDetails" runat="server"
    onitemdatabound="RepterDetails_ItemDataBound"
    onitemcommand="RepterDetails_ItemCommand" >
    <ItemTemplate>
    <tr>
    <td>
    <asp:DropDownList ID="ddlTypeName" runat="server" onchange="ddl(this)"></asp:DropDownList>
    </td>
    <td>
    <asp:TextBox ID="txtCode" runat="server" Text='<%#Eval("otaRoomTypeCode") %>' />
    </td>
    </tr>
    </ItemTemplate>
    </asp:Repeater>
    Using the javascript i got the selected dropdownlist selected value, how to get the textbox text which is in the same row.
    Please give me advice and please find the repeater control screenshot.
    Thanking You, Nagendra.

    This forum if for C# issues, please move your post to asp.net forum:  http://forums.asp.net/
    Thanks
    Fouad Roumieh

  • Photoshop script for Expand/Contract of Selection

    Hi!
    I need script that will make Expand or Contract Selection for example 1px each time I hit keyboard shortcut. I mean I would like to use this options because I use it very often but I would like without dialog box when PS ask for value of expand/contract. When I will have script for those I could make it by wheel in my Intuos Pro. Now I can't because every time I have dialog box. Thanks in advance for help!
    Regards
    Arek

    cool, thanks, the script works great!
    #target photoshop
    app.bringToFront();
    try {
            // test for active selection
            if (hasSelection(app.activeDocument)) {
                // expand selection
                //app.activeDocument.selection.expand(new UnitValue (100, "px"))   
                // contract selection
                app.activeDocument.selection.contract(new UnitValue (100, "px"))
            else {
                alert ("ERROR: no active selection \n USAGE: the script requires an active selection")
    catch (e) {
            alert ("ERROR: the script did not execute")
    //////////// FUNCTIONS ////////////
    function hasSelection(doc) {
      var res = false;
      var as = doc.activeHistoryState;
      doc.selection.deselect();
      if (as != doc.activeHistoryState) {
        res = true;
        doc.activeHistoryState = as;
        return res;

  • Expanded hierarchies in workbook...

    Hi All,
    We are getting a weird problem when we are refreshing a query in workbook
    When data is refreshed, the values pull into the hierarchy top level, but not the detail level. After expanding and collapsing the hierarchy node, the values is then displayed.
    This is kind of confusing!!!!
    Any ideas will be really appreciated !!!
    Thanks

    Hi........
    Hierarchy Active
    You use this function to switch display hierarchies on and off.
    Hierarchy Node Expanded
    Select Hierarchy Node Expanded if you want to expand a hierarchy node. If you want to collapse the hierarchy node, deselect the indicator. You can also expand or collapse the hierarchy node by choosing the hierarchy icon.
    Expand Hierarchy :
    Choose Expand Hierarchy ® Level <1> if you want to display more levels of the hierarchy. You can also expand the hierarchy by choosing the hierarchy icon. For more information
    Also check this link :
    http://help.sap.com/saphelp_nw70/helpdata/en/f1/0a5543e09411d2acb90000e829fbfe/content.htm
    It may help you........
    Regards,
    Debjani......

  • Template selection (Scope)

    Hello Friends,
    Everytime I create a project, I get default same scenarios template underneath scope tab.  When I expand Select one or more scenarios, I get "BP_UTUS147 - Best Practices for Water Utility".It is suppose to give me list of scenarios.. right..?? how can I get the list of scenarios.
    Ketan

    Hi Kenny,
    there might be a misunderstanding.
    When you create a new project with "SOLAR_PROJECT_ADMIN",  Tab "Scope" -> "Template Selection" shows the available Templates.
    By accident, SAP has shipped the "Best Practises for Water Utility". So, you need first to create your own templates (projects).
    It's explained in detail in help:
    <a href="http://help.sap.com/saphelp_sm40/helpdata/en/1a/43c93a37c59122e10000000a114084/frameset.htm">Application Help: Implementation of SAP Solutions -> Projects -> Projects Administration -> Create/Change Projects -> Specify Scope</a>
    Best regards,
    Ruediger Stoecker

  • How to shift selection of magic wand tool by 2 pixels to take the edges off?

    Hello,
    I'm trying to make a selection with the magic wand tool and shift the selection edges by a pixel or two, but the 'refine edge' button doesn't seem to do anything.  I want to cut a pixel off all the outer edge of an image I have cut out of another picture.  Any help would be great thank you.

    Depending on whether you have selected the image or the background, use  Select > Modify > Expand Selection, or Select > Modify > Contract Selection

  • Unable to expand the dropdown in the Webdynpro Java iview in Portal

    Dear Experts,
    We have a lot of Webdynpro java application iview in portal in production system.All the dropdowns present in those iviews are not expanding in production system.
    But we are able to expand & select the same webdynpro java iview applications in Quality system.
    We are using Internet Explorer for viewing the iviews.
    Can anyone help me to provide a solution to the issue.
    Regards,
    Krishna Balaji T

    Hi Micheal,
    The issue had been solved by myself.
    Regards,
    Krishna Balaji T

  • Multiple selections to multiple layers or multiple files with one go ?

    Hi,
    how to convert multiple selections to multiple layers or multiple files with one go ?
    Thanks!

    You may want to ask over at
    http://forums.adobe.com/community/photoshop/photoshop_scripting?view=discussions
    or
    http://ps-scripts.com/bb/
    I think there are Scripts about for the task or at least ones that could be adapted without too much problems.
    The usual approach is, I think, creating a Work Path from a Selection and then using (expanded) Selections based on the individual subPathItems to intersect with the original selection.
    Of course there are possibilities for bad results …

  • Flex 4.6 DropDownList...

    hi!!!
    i have problem with this code.....
    private function selectItemsPlaylist2(evt:MouseEvent):void{
                                            var stat:SQLStatement = new SQLStatement();
                                            stat.sqlConnection = connection;
                                            stat.text = "SELECT id, nome, base, testo, lista FROM playlist where lista = ?";
                                            if (DropDownList.selectedItem.combo == null) {
                                                      Alert.show("Selezionare la PlayList!", "Errore");
                                            }else{
                                            stat.parameters[0] = DropDownList.selectedItem.combo;
                                            stat.execute( -1, new Responder(onSelectedPlayList2));
    if don't select DropDownList, show error!!!! why???
    help me!!!!

    As selected item is null so DropDownList.selectedItem will be giving u already null.
    Hence    if (DropDownList.selectedItem.combo == null) does not makes any meaning.
    Check  like:-
    if (DropDownList.selectedItem == null)
    It will work.
    with Regards,
    Shardul

  • How to shrink selection by certain amount of pixels from the border?

    hi
    i'm not good using photoshop, i just installed the pre realease cs6 and trying to find a way of shrinking the marquee selection by certain amount of pixels from the selection border
    i found expand selection but it doesn't allow me to type nigative value plz help

    thank you so much guys you are very helpful
    just one more question :
    i found interesting thing, when you do Select > Transform selection and press alt+shift and drag mouse, it will shrink the selection from both sides but not evenly like this:
    [IMG]http://i40.tinypic.com/2mry3br.jpg[/IMG]
    plz any more tips on how to make it evenly
    thanks

Maybe you are looking for

  • [CS4/JS] Pnglib.jsx -- A PNG creator function

    After seeing Marc Autret's marvellous pngswatch script, I spent several hours creating PNGs with Photoshop, copying its hex data into Javascript compatible format, finding the relevant color bytes to change ... and all the while I was thinking, "ther

  • How to add  teradata Data type in essbase shared services configuration

    [pic here |http://gerardnico.com/wiki/_detail/epm/hyperion_epm_system_configurator_database_registry.jpg?id=epm%3Aepm_installation] I am not getting oracle or Teradata during configuration of Shared Services in database type PIC HERE I added both the

  • Why does my 8gb ipod touch have 6.4 gb?

    help i have bought an 8 gb ipod touch but i only have 6.4 gb. can i get the 1.6 gb back? how?

  • Same Subject field sends copies of email to everyone!

    Say I have 10 clients and at the end of the month I want to email them their invoice as an attachment. The subject matter in each email is "Invoice" Each client not only gets an email with their invoice attached they also get the other nine clients e

  • Weblogic GCOverlimit Issue

    Hi, We have only one small adf application in weblogic 10.3.5. After 3 or 4 days, wls goes into GC overlimit error msg. We putted batch file in task scheduler for garbage collection of wls. The Batch file is executing wls script for garbage collectio