Click to See Complete Forum and Search --> : How can i get this Javascript to work


woow
10-12-2004, 12:43 PM
Hi,

I am a newbie and I am stuck in this script can someone help me please,

Javescript:

function toggleT( objName, swi )
{
var theObj = docuemnt.getElementById(objName);
( swi == "s" ) ? theObj.style.visibility='visible' :
theObj.style.visibility='hidden';
}

HTML code:

<span id="course" onClick="toggleT('divtag58','s')" onMouseOut="toggleT('divtag58','h')">Designing w/Computers I</span></font></strong><span id="divtag58">
check check check<font color="#666666">woow</span>

this does not work. I think it something to do with Javascript and I can't figure whats wrong. It should work in all browsers.

Thanks in advance

HaganeNoKokoro
10-12-2004, 12:46 PM
var theObj = docuemnt.getElementById(objName);

should be "document' not docuemnt

And for the future, please post javascript questions in the javascript forum... It's just down the hall :D

agent_x91
10-12-2004, 01:55 PM
We don't want javascript scum invading our nice civilised java forum! go away! :p :D :D :D :D :D