


Hi All,
I have Dropdown widget of type "granite/ui/components/coral/foundation/form/select" which has 3 values(None,Standard,Featured).Based on the selection of a value in this dropdown I need to hide/show other widgets.In Chrome browser,i am able to get the selected value where as in Firefox always i am getting blank unable to fetch th selected value.
Below is the code snippet which I am using to achieve this.
$(document).on("foundation-contentloaded", function () {
var selectedPromoTypeOption = $('.promo-type-selection coral-select-item[selected]').val();
alert("selectedPromoTypeOption::"+selectedPromoTypeOption);
if (selectedPromoTypeOption == "none" || selectedPromoTypeOption == "standard") {
$('.article-color-options').closest('.coral-Form-fieldwrapper').addClass('hide');
}
})
Anyone has any idea ,how to fetch the selected irrespective of the browser.
Thanks,
GK
I talked to our team about this. The reply was:
Hey here is a sample
1. get the select
var
$countSelect = $("coral-select[name='"
+ COUNT_SELECT + "']");
2. get the value
var
maxCount = parseInt(countSelect.value),
Views
Replies
Sign in to like this content
Total Likes
I have followed the article and tried to get the value as mentioned in the article but not able to read value.
In Firefox browser, when evaluating this expression it's always returning emprty value.
Is there any other way to read the value ir-respective of browser?
var selectedPromoTypeOption = $('.promo-type-selection coral-select-item[selected]').val();
Views
Replies
Sign in to like this content
Total Likes