re-open
Public

I’d like to set up the items in a ComboBox from a string array.  Since ForeUI does not have this as an action, I am using JavaScript to attempt this.  I have done the following:

1) Add Behavior ‘Element Initialized’ to the ComboBox.

2) Add Action ‘Call Javascript’ for this behavior

3) Here is the JavaScript I am using:

    var sponsors =
    [ “CWA “,
      “B A”,
      “KGA”,
      “JEB”
   ];
    setItems([“ComboBox_4”],sponsors);

When I execute this on Chrome, I get ‘Uncaught ReferenceError: setItems is not defined’

I do see other references to ComboBox methods (like setSelectedIndex) and these work fine.  Not sure why this in undefined.

1 answer

Staff January 7, 2016

The message explain itself quite clearly: the setItems method is not defined. We don’t provide this method, so you will be the one who defines it.

Please notice that we don’t guarantee your customization will work. When you define and execute your own Javascript function, you are on your own and you should know what you are doing, otherwise your HTML5 simulation may stop working.

#1

Please login or Register to Submit Answer