I want to get selected items from iccube-dropdown-widget with javascript. Drop-down-widget has Div-ID ‘icCubeDropDown’.
var t = window.document.getElementById(‘icCubeDropDown’);
doesn’t work, t is Null. How can I do this?
Thanks in advance!
EDIT
var text = $("#w8 select.icCubeDropDown").children("option").filter(":selected").text();
var text is empty. What is wrong?
Here is my report code:
You're mixing class with id, 'icCubeDropDown' is a class. Id's in icCube are more like 'ic3-131'.
I'd be using jquery selectors
var select = $("#ic3-131 select.icCubeDropDown")
this finds the element with id ic3-131 and a select descendant.
hope it helps