Jump to content

drop down list only works on firefox


Sesquipedalian

Recommended Posts

Why does this only work on firefox? Internet explorer seems to have errors with it:

 

function list(what, how) {
if (how == 'out') {
	what = document.getElementById(what);
	for (a in what.getElementsByClassName('sub')) {
		if (a >= 0) {
			what.getElementsByClassName('sub')[a].setAttribute('style', 'display:block;');
		}
	}
}
else if (how == 'in') {
	what = document.getElementById(what);
	for (a in what.getElementsByClassName('sub')) {
		if (a >= 0) {
			what.getElementsByClassName('sub')[a].setAttribute('style', 'display:none;');
		}
	}
}
}

 

Thanks for your help,

 

-

Adam

Link to comment
https://forums.phpfreaks.com/topic/173182-drop-down-list-only-works-on-firefox/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.