Which item is selected?

Hello,
In Dreamweaver CS3 we have a drop-down list in a form. When
the user selects an element in the list, we need to determine which
element was selected; specifically we need the text string of the
selected element. How do you do this? The raw code that we have so
far is attached.
If there is an online tutorial or sample code for this, that
would be great.

The element or item that was selected is automatically placed
in a form variable for you by CS3. You can access it by binding it
to the screen you are calling.

Similar Messages

  • SO Pricing User Exit - How to know which item is selected for re-pricing.

    Hello Experts,
    I have to modify material data when user does a update pricing in VA02, the problem is...How do I know which item is selected for re-pricing (in MV45AFZZ)? I am using user exit USEREXIT_PRICING_PREPARE_TKOMP.
    For Ex: If my order has 3 items and 2nd one is selected and then 'Update' is done on 'conditions' tab. Above pricing user exit is triggered 3 times for all items, so I cant check XVBAP.
    Your help will be appreciated.
    Thanks,
    Sagar

    Hi J@Y,
    Thanks for reply. But USEREXIT_PRICING_PREPARE_TKOMP is triggered for all items, so how do I know which is current item?
    If you see in debug mode, xvbap-posnr and tkomp-kposn will have 10,20,30 everytime (for 3 times). How do I know if user has selected 20?
    Thanks,
    Sagar

  • How do you specifically let the Itemlistener know which Item was selected..

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

    getSelectedItem()

  • How do you specifically let an Itemlistener know which Item was selected?

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

    Hi,
    Try this method
    String[] petStrings = { "Bird", "Cat", "Dog", "Rabbit", "Pig" };
    JComboBox petList = new JComboBox(petStrings);
    if ( petStrings[0]==(String)petList.getSelectedItem() )
    System.out.println("I'm a bird");
    }else{

  • JSpinner and finding which item was selected...

    With a JComboBox, I can load up my list with an array and use "getSelectedIndex()" to grab the index number of the item the user selects.
    With a JSpinner (SpinnerListModel), I can load up my list with an array but there doesn't appear to be any way to retrieve an index number. Am I missing something? The best thing I can come up with is to use "getValue()" and search my array for that value and then I'd have the correct index. Seems the long way around to me.
    I have other elements in the array I need to get to based on the users selection.
    -Duane

    If you're creating your own object class to use in the list of possible values, you could make the array index be an instance variable in this class. I just had to do something like this recently. As in:
    class MySpinnerValue
      public int index;
      public String name;
      //  ... other useful stuff
      public String toString()
        return name;
    // ... and somewhere we create the list, like ...
    MySpinnerValue[] list=new MySpinnerValue[10];
    for (int x=0;x<10;++x)
      MySpinnerValue v=new MySpinnerValue();
      v.index=x;
      list[x]=v;
    }Then when you retrieve a value you just check index to see where it is in the array.
    Clumsy, yes, because it relies on setting an index value equal to the array subscript, which is redundant data in a sense. (Ah, there were advantages to pointers in C, you could just say "pEntry-entry[0]" to get the index ...)

  • DVD menus: Which item is selected?

    I've created a DVD from old Super-8 mm film reels. I got 6 years of movies, typically 5 3-minute reels from each year.
    In iMovie I assembled all 30 reels in date order, inserted titles for each year, added music, made chapter markers for each year's title and for each reel, and created my iDVD project.
    In iDVD, I created the DVD menu from a theme with two buttons: "Play Movie" which starts at the beginning of the entire movie and "Select a Scene" which takes you to another menu. The second menu allows the viewer to select a year, which starts playing at the year's title scene. At the bottom of this menu is another button "Reel by Reel" which takes you to a third menu that lists each year again. This time if you select a year, however it takes you to another menu listing the reels from that year.
    The whole structure is like this:
    DVD->
    Play Movie
    Select a Scene->(new menu)
    Start at the Beginning
    Year 1
    Year 6
    Reel by Reel->(new menu)
    Year 1->(new menu)
    Reel 1
    Reel n
    Year 2->(new menu)
    Reel 1
    Reel n
    Year 6->(new menu)
    Reel 1
    Reel n
    It's amazing, but it all works!
    Except for one annoying thing: When I click on any of the buttons marked "(new menu)," the new menu shows up correctly and all the buttons are even in the right visual and navigation order, but...a random button is initially selected!
    If my menu shows Y1, Y2, Y3, Y4, Y5, and Y6, it might be "Y3" that is initially selected when the menu is displayed.
    Does anyone have any ideas how to set which button gets pre-selected when a menu is displayed?
    Thanks!
    Jeff

    Jeff:
    That problem seems to be a bug with iDVD 5. Many of us have reported the same occurrence. Currently I've not read about any fix for it. We're all hoping the next update will take care of it.

  • How to read which item in a listbox is currently selected?

    Is it possible to read which item in a listbox is currently selected?
    I know how to tell what item in the list was double-clicked. I'd like to be able to click (once) on an item in the listbox and then use buttons on the front panel to affect the item(and list). For example, click on an item in the list and then click an "insert" button to add an item to the list before the selected one.
    I'd like to be able to do this with both regular and multicolumn listboxes.

    The value of the listbox is just a number for which row is currently selected. If you setup your listbox for 0 or more items or 1 or more items, then the value of the listbox is an array of I32 numbers showing which rows are selected. Use a property node to get the Item Names property (an array of the list items) and you can use the value(s) to index into the array. I have included a VI that I use to move items up and down in the list as well as delete items. Feed it the array of item names and the index for the line you want to move/delete. Then take the output and feed it back into a property node of item names.
    I hope this helps.
    Rob
    Attachments:
    Sequence_Element_Move.vi ‏37 KB

  • How to auto populate a field based on drop down list unless specific item is selected

    Hi all,
    Apologies if I have posted this in the wrong area but I am new to Adobe LiveCycle, JavaScript and these forums.
    I am trying to build an Acrobat form using LiveCycle but am having trouble with the drop down lists.
    Inititaly I simply wanted to populate fields in one table based on the selection of a corresponding drop down list in another table.
    I used the following code and it worked fine:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The problem is that now I want the above code to work UNLESS one of the items in the dropdown list is specifically selected in which case I want the text box in the other table to display a message such as "Enter details in the field below".
    I have tried to create an If Else statement using the following code:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1"); 
    for (var i=0; i <= fFrom.length-1; i++) {
         if (fFrom.item(i).rawvalue = "Option 3"){
         fTo.item(i).rawValue = "Enter details in the field below";
         else {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The code now populates the field with "Enter the details in the field below" no matter what item I select from the dropdown list.
    Your help is greatly appreciated.
    Cheers,
    ozzy_q

    Follow Up:
    Ok so ive changed things up a bit and have had some more success.
    I have used a Switch statement in my For loop to perform different actions based on the item selected.
    The code looks like this:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*] .Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[* ].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         switch (fFrom.item(i).rawValue)
         case "Option 3":
         fTo.item(i).rawValue = "Enter the details in the field below";
         break;
         default:
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
         break;
    This code solves my problem but has thrown up a new issue:
    When i select Option 1 or 2 from the dropdown list  the change in the text field is instantaneous, however if I select Option 3 it wont appear in the text field until I either select Option 3 a second time or select another item. Its as if the text field is a selction behind what I have enterd in the dropdown list.
    Any thoughts?

  • How to enable a button only when a tilelist item is selected

    Simple question but it seems quite awkward to me. How do I enable a button only when an item within a tilelist is currently selected?
    For example lets say if I have a button called button1 that is disabled by default and a tilelist called tilelist1 what would I have to add into the brackets of the following code (enabled property of the button) to ensure that the button is only enabled when an item in the tilelist is currently selected but disabled when no items are selected:-
    enabled="{}"

    enabled="{tilelist1.selectedItem}"
    that should do it, it's making an implicit comparision with null (tilelist1.selectedItem == null) which will result in a boolean.
    SelectedItem is null when nothing is selected , not null when something is.

  • F.19 GRIR reclassification - Item not selected in the report log

    Hi Guru,
    There are two items (one cleared pair) which are not selected into GRIR reclassification (Tcode F.19), both posting date is on 30.05.2007, while wiht cleared date on 30.06.2007 (clearing document with posting date on 31.05.2007), why they are not counted in the reclassification report. pls advice, I really donot have any clue about it.
    Thanks,
    Kick

    Hi All,
    why nobody reply this question, is it the question not clear?
    There are two items (one cleared pair) which are not selected into GRIR reclassification (Tcode F.19), both posting date is on 30.05.2007, while with cleared date on 30.06.2007 (clearing document with posting date on 31.05.2007), why they are not counted in the reclassification report. the reclassification has been done on the last day of May.  pls advice, I really donot have any clue about it.

  • Html:checkbox - which box is selected and on in what tr

    I have a jsp in which I iterate over a LinkedList of people. Each person gets there own row in a table on the jsp page. In each row is the name of a person in the first <td> and then a checkbox in each of the next three <td>'s.
    A user may order one of three reports on any or each of the names coming from my LinkedList by clicking on a checkbox.
    Right now I am able to determine which report to order by which checkbox is selected in a row, but am unable to determine which row/person to order the report for.
    I've seached this forum and went through the first couple pages of results with no luck. And spent a bit of time on google but can't seem to get the exact keywords to retrieve the results I need.
    Here is a small sample of how I am setting up the table. Just a snippet, names have been changed, you won't be able to compile this.
    <logic:iterate id="person" name="someLogical" property="personsList" type="someDataObjectType">
         <tr>
              <td valign="top" nowrap>
                   <bean:write name="person" property="name"/> �
              </td>
              <td align="center" valign="top">
                   //someForm is my actionForm, and orderReportOne is a boolean being set in the form
                   <html:checkbox name="someForm" property="orderReportOne"/>
              </td>
              <td align="center" valign="top">
                   <html:checkbox name="someForm" property="orderReportTwo"/>
              </td>
              <td align="center" valign="top">
                   <html:checkbox name="someForm" property="orderReportThree"/>
              </td>
         </tr>
    </logic:iterate>The booleans in my form are being set correctly but don't relate to a specific person. They would just order reportOne for each person in the list.
    Edit: I will be leaving soon for the rest of the day and may or may not be able to reply again until monday, but appreciate any responses. Thanks
    Message was edited by:
    Hentay

    It depends on how you're utilising your XML, but ComboBox has selectedIndex property so that you can trace the index number of the item selected.

  • Connected webpart - add item with selected data

    Hi!
    I have a page with connected web parts.
    Example:
    List one: Companies
    a address List with companies
    List two: Employees
    A list with employees and a relation to companies (Company name).
    On the view item on companies i have list Employees connected. When i add an item i would like to have the Company name selected in the drop down.
    I have seen examples on using JavaScript but this doesn´t work in SharePoint 2013. Anyone with a solution for this, Jslink perhaps?

    Hi,
    According to your post, my understanding is that you wanted to add item with selected data in connected webpart.
    I recommend to use lookup column in the Employees to add a relation to companies.
    You can check “Yes” under “Require that this column contains information”. Then you need to select an company when you add a item.
    The result is as below:
    If you want to set the defult value for the lookup column, you can use InfoPath and no code.
    For more information, please refer to:
    SharePoint 2010 - Set default value for a lookup column using InfoPath and no code
    In addition, a simple add-on(SharePoint Default Value Add-On) which inject a "default value" section into "Create Column" dialog, seems to be a solution.
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Forms in PowerShell: clear checkedlistbox items when "select all" is deselected

    Hello all,
    I recently got help to add a "select all" checkbox to my checkedlistbox, and it works great. However, I'd like to have it also work where, when the "select all" checkbox is consequently unchecked, it clears all the checkboxes. Is this
    easy to do, or would it be easier to just have an "unselect all" checkbox? Code is as follows:
    [void][system.reflection.assembly]::LoadWithPartialName("System.Drawing")
    [void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    $objForm = New-Object System.Windows.Forms.Form
    $objForm.Text = "Test"
    $objForm.Size = New-Object System.Drawing.Size(700,300)
    $objForm.StartPosition = "CenterScreen"
    $CheckedListBox = New-Object System.Windows.Forms.CheckedListBox
    $CheckedListBox.Location = New-Object System.Drawing.Size(20,20)
    $CheckedListBox.size = New-Object System.Drawing.Size(300,100)
    $CheckedListBox.CheckOnClick = $true
    $CheckedListBox.Items.Add("Select All") > $null
    $CheckedListBox.Items.AddRange(1..20)
    $CheckedListBox.ClearSelected()
    $CheckedListBox.Add_click({
    If($this.selecteditem -eq 'Select All'){
    For($i=1;$i -lt $CheckedListBox.Items.Count; $i++){
    $CheckedListBox.SetItemChecked($i,$true)
    $objForm.Controls.Add($CheckedListBox)
    $Form = $objForm.ShowDialog()

    Rhys,
    Can you explain the $checkedlistbox.checkeditems[0] part? are you looking at the first item in the checkedlistbox object, or what is the .checkeditems[0] part referring to?
    Boe,
    Is this also what your code is referring to when you say $this.getitemcheckstate(0) ?
    The [0] refers to the first item in the listcheckedbox (which in this case is the 'Select All' item) and checks to see if it is checked or not. Rhys's example looks at the first item in the array of checked items ('Select All' would always be the first if checked
    and wouldn't exist if it was unchecked).
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • How do I choose which items appear when I open my Imac for the day?

    How do I choose which items appear on the screen when I open my Imac (intel) for the day, after shutting down the night before? Thank you. ArmandL

    There are two ways. Mt Lion and Lion have a feature that launches all programs that were running when you logged out or shut down. You can toggle this feature on and off when you shutdown/log out. Or you can set up login items in your user settings which will automatically launch any program you set there. To do this launch System Preferences, select Users and Groups and click on the Login Items but near the top part of the dialog. Click on the + button to add programs you want to be launched when you login or start up the computer.

  • Determijne which ChoiceGoup is selected?

    I have few ChoiceGroups on current Form. They are .POPUP. I would like to know which one is selected, on which one is user standing. Not what is selected from popup list, but which group is selected.
    How to do that? Tnx.

    The element or item that was selected is automatically placed
    in a form variable for you by CS3. You can access it by binding it
    to the screen you are calling.

Maybe you are looking for

  • Save Query - An error occurred while creating connection strings for the query

    A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.

  • Iphone 5 6.1 update screen not responding

    Just did a 6.1 update and now my screen keeps freezing, once it starts to work its ok but after i stop for like two seconds it becomes unresponsive again... Any software solutions or do i need to go to apple and get a new phone?

  • RFC function not displaying information correctly in internal table

    Hi all. I have created a RFC function that interrogates another SAP system and collects data from that system. The problem i have noticed is that some fields like Unit of measure, values (currency) are not interpreted correctly in the target system a

  • Help! Droplets and Exporting

    hey folks, I seem to recall this being posted, but for the life of me i cannot find it. what is the correct way to setup the photoshop Action & and Automate options when it comes to creating a sharpening droplet (for use in an Export's "Post-Processi

  • Load php url in a movieClip

    Hello all, I m using following code to display a php url content in a movieclip:- this.createEmptyMovieClip("clp",this.getNextHighestDepth()); var listener:Object = new Object(); imgLoader = new MovieClipLoader(); imgLoader.addListener(); imgLoader.o