I have a page that has a tickbox list that I want to mimic as a dropdown menu. I have a DIV that looks like the top of a dropdown menu (i've called it "dropdownCATsma ll") and, when it's clicked, it hides itself and shows another one in its place to show the dropdown menu is selected, and the list of tickboxes appears underneath (both called "dropdown_categ ory"). Once clicked again, it returns to its original state, hiding itself and showing the original div again.
I wrote the code to do it like this:
I've successfully got this working in IE7 but in FireFox (v3), each time I click the div box, the Error Console shows up the message "getStyleClass( "dropdownCATsma ll") is null".
But it isn't null... it's "display:bl ock" by default. What could be the problem?
I wrote the code to do it like this:
Code:
<div class="dropdownCATsmall" onClick="getStyleClass('dropdown_category').style.display = 'block'; getStyleClass('dropdownCATsmall').style.display = 'none';></div>
But it isn't null... it's "display:bl ock" by default. What could be the problem?
Comment