Hey,
I’ve just started using Javascript after a few years of not using it and I’m encountering problems already.
Ok, first I had this function:
[CODE]function gotousermenu() {
document.getElementById(‘mainmenu’).style.display=”none”;
document.getElementById(‘usermenu’).style.display=”block”;
}
That worked fine.
But then I changed it to this:
[CODE]function gotousermenu() {
document.getElementById(‘menutab’).style.background-color=”#7db7ff”;
document.getElementById(‘usertab’).style.background-color=”#5591db”;
document.getElementById(‘mainmenu’).style.display=”none”;
document.getElementById(‘usermenu’).style.display=”block”;
}
And it doesn’t work. menutab and usertab are A tags. mainmenu and usermenu are DIV tags.
Why doesn’t it work when I do that. Even the bit that worked originally doesn’t work with that extra code.
Thanks for helping.