Combobox - If Selected Item

  • Hi,

    I'd like to make an action that will depend on which option was selected in a combobox.

    I'm trying this:


    if(combobox[mycombo].selectedItem == item4,
    call-this-action(); );


    But I can't get it to work.

    What am I doing wrong?

    I could find the answer for this.

    Thanks,

    Daniel

  • Daniel,
    Please note that the <combobox /> is translated to the krpano layer[] on onxmlcomplete event.
    To refer to the combobox layer and item layers you need to follow the naming as written as:
    (just reading from the <action name="combobox_additem" of the combobox.xml)

    Code
    <!-- create the item layer/textfield -->
    		calc(itemlayername, 'comboboxitem_' + cbname + '_' + itemname);

    Pavel

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!