I am new with jQuery, as I know this can be done thru jQuery. I have two selectboxes. I just want it something like this, when I select a value in my first selectbox the second selectbox will show. And when I select different value on my first selectbox, my second selectbox will hide. Meaning, there is one value in my first selectbox that has the ability to show the second selectbox.
Yes, but I want something like this… In the first selectbox, three options namely, VB course, Javascript course, PHP course. When user select VB course, the second selectbox show with two options namely, VB.NET and VB6. When user selects other options of the first selectbox, the second selectbox will hide.
One way to achieve that is to trigger the change event of the select field as a part of the page loading.
That depends on what you are using to validate it with. What is it that says values are required.
Normally you cannot guarantee that javscript (or jQuery) scripting will always work. As a result, on the server side you should ignore the selectbox 2 value and only pay attention to it if the selectbox 1 value is appropriate.
Why does jQuery think that field is required.
One way is to completely remove selectbox2 from the form. The whole select box could be stored as a data value and retrieved only when you need to show it.