Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Which one of youze guyz...
Which one of youze guyz...
2007-07-15, 1:51 PM #1
...is good at HTML and Javascript?

The scenario:

I have a div, then three other divs inside that. I need to turn them on and off depending on a given state. That part is not that relavent for I have (I think) a away to deal with passing the state. My problem is the Javascript for I know jack **** of it. This will most likely passed into the onLoad.

Here's what I tried to slap together
Code:
<script language="javascript" type="text/javascript">
function toggleDiv(whichDiv)
{
    if (document.getElementById)
    {
        var elems=whichDiv.split(',');
        var elem,style;
        for (var i=0 i<elems.Count; i++)
        {
            elem=elems;
            elemStyle=elem.style;
            
            elemStyle.display = (elemStyle.display=="none") ? "block" : "none";
        }
    }
}
</script>
...
<body onload="toggleDiv('welcome','error');">

What say the masses?

Edit: Obviously, I'm not banned. CoolMatty think's he's funny but he FAILS.
Code to the left of him, code to the right of him, code in front of him compil'd and thundered. Programm'd at with shot and $SHELL. Boldly he typed and well. Into the jaws of C. Into the mouth of PERL. Debug'd the 0x258.
2007-07-15, 1:52 PM #2
BANNED. :tfti:
2007-07-15, 1:53 PM #3
B&!

<.<
>.>

Sorry, I'm only semi proficient in C and MATLAB. And by semi I mean crap.
2007-07-15, 1:54 PM #4
That one.

/me points
Star Wars: TODOA | DXN - Deus Ex: Nihilum

↑ Up to the top!