You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, December 4th 2013, 2:03am

How to add items dynamically to combobox via Javascript?

Hi,

I wish to add items dynamically to combobox via JavaScript but I can't find any reference..
The combobox plugin provides only local actions and I am not sure if it's possible to access
a plugin's local action.

I have tried something like "plugin[name].localAction(param1,param2)" but no luck.

Any idea?

Best Regards,
Hyung

jordi

Intermediate

Posts: 453

Location: Barcelona

Occupation: creating ideas & coding them

  • Send private message

2

Wednesday, December 4th 2013, 9:30am

I'm afraid you can not create new items...

dinamically you can only add layers&hotspots
everpano.com step beyond 360

3

Monday, December 9th 2013, 9:45am

Hi,

the combobox plugin provides several actions for adding items:
http://krpano.com/plugins/combobox/#actions

e.g. from javascript:

Source code

1
krpano.call("plugin[comboboxname].addItem('Hello','showlog(); trace(Hello);');");


Best regards,
Klaus

4

Monday, December 9th 2013, 11:12am

Thank you Klaus,

I have already tried something like but failed. Probably I have misspelled something..
I will try it and share the result!

Thanks again :)

Hyung

5

Tuesday, December 10th 2013, 5:03am

I have tried Klaus's code and worked fine but I think there is a small bug when using this
code inside jQuery Ajax Get function.. The bug is that event the default rowcount is 5,
the rowcount becomes 1 so I have to reset this rowcount to 5 after I have inserted the
items. I haven't tried it on mobile version but I guess this happens only in Flash version.

Best Regards,
Hyung