-2

I have a dropdown list containing width values:

  • val1
  • val2
  • val3
  • all

And I also have three checkboxes:

  • val1
  • val2
  • val3

The checkboxes are responsible for a progress bar, all of them have an onclick function and they are working well. I want to make them work when I use the dropdown list too but I can't. So when I select a value from the dropdown list it modifies the checkboxes checked attribute but has no effect on the progress bar and I don't know why.

5
  • 2
    Show your effort. Add the code that you have tried. Commented Apr 5, 2013 at 7:12
  • You should trigger an event manually, check this post: stackoverflow.com/questions/2490825/… Commented Apr 5, 2013 at 7:13
  • "I want to make them work when I use the dropdown list too".. I guess some part of the picture is still inside your head and definitely not here Commented Apr 5, 2013 at 7:15
  • Please just a suggestion for the future post. Whenever posting any question on the SO, please do also post the HTML markup and the code that you have tried. That would help us to provide better answers! Commented Apr 5, 2013 at 7:20
  • This is a real problem. I have no permission to post the real code. The question is, how can I manipulate a progress bar with checkboxes which are checked or unchecked with jQuery (through a dropdown list)? Commented Apr 5, 2013 at 7:36

1 Answer 1

1

If you are using jQuery (as you are, according to your tags), set up an event handler for the change event. But you must trigger the change event manually, since you change the value programatically.

Some information for the manual triggering of the change event see this question

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.