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.

15 answers

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

I really loved it here but are there any recent updates? Thanks  https://paintersbatonrougela.com

#2

Awesome! Learned alot thanks so much keep posting more.  https://weldinganchorage.com

#3

thank you for this! really appreciate you doing this  bathroom remodeling contractors

#4

thank you for this! really appreciate you doing this  http://www.weddingphotographerswichitaks.com

#5

Awesome blog by the way and thanks for sharing! Jen

#6

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. physical therapy spokane

#7

Your HTML5 simulation may stop working. 

Springfield Ma roofing contractor

#8

Awesome! Learned alot thanks so much keep posting more.  coyote fencing santa fe

#9

Awesome! Learned alot thanks so much keep posting more.  hair extensions spokane valley wa

#10

thank you for this! really appreciate you doing this  bookkeeping services tucson az

#11

Thank you for this lovely article!  windowcleaningsiouxfalls.com

#12

I love your content! Great job! http://www.microbladingspokane.com

#13

I highly appreciate your work here! Thank you so much! http://www.microbladingboiseid.com

#14

I wanna know more about this because this is really informative!

http://www.portlandmicroblading.com

#15

Please login or Register to Submit Answer