Click here to Skip to main content
15,891,762 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am using a dropdown. I have values ​​between 1-10, 1-20, 1-50. When I select the 1-20 option from the dropdown list I want to mark the checkbox up to the value I selected. How do you suggest resources?

What I have tried:

I tried to return in the list with foreach failed
Posted
Comments
F-ES Sitecore 12-Jun-19 5:11am    
What do you mean by "mark the checkbox up to the value I selected"?
[no name] 12-Jun-19 5:21am    
if there is a '1-10' option in the dropdown and the user chooses this option I would like to mark 10 checkboxes
F-ES Sitecore 12-Jun-19 5:27am    
Without knowing anything about those checkboxes, like how you identify them on the page, it is impossible to give specific advice. Make the "value" of your select options the number of checkboxes you want to "mark";

<option value="10">1-10</option>

read that value in javscript, get a reference to all of the checkboxes then in a for loop set them to be checked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900