phoenixschule priority asked 3 years ago

JS for a select box

document.getElementById('xxx').getElementsByTagName('option')[yyy].selected = true

is working fine with standard - not working with your select (class="select")

any ideas?

br thomas

UNNdev priority commented 3 years ago

Read the documentation's API / Methods section. Select.getInstance(document.getElementById('xxx')).setValue(yyyy) where yyyy is the value you want to set and xxx the ID of the element.

Michał Duszak staff answered 3 years ago

You can refer to the Select with our getInstance() method. For example:

For further instructions read our API tab for Select:

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.7.1
  • Device: PC
  • Browser: ALL
  • OS: WIN10
  • Provided sample code: No
  • Provided link: No