Hey guys a bit stuck here. Ill first start with showing you the code.
<script type="text/javascript" language="javascript">
var Stanley = "Text here";
function TextLooper(Alien)
{
var myArray = Alien.split("");
var loopTimer;
var changeLetter = function ()
{
if(myArray.length > 0)
{
document.getElementById("TypingStanley").innerHTML += myArray.shift();
}
else
{
clearTimeout(loopTimer);
}
}
setInterval(changeLetter, 70);
};
function InfoBoxClick(id, visibility,AlienVar)
{
document.getElementById(id).style.display = visibility;
TextLooper(AlienVar);
}
</script>
Thats my javascript and i use a href with onlick which is below;
<a href="#Aliens-Stanley" onclick="InfoBoxClick('StanleyInfo','block','Stanley');">LinkName</a>
I am trying for the third parameter of the function InfoBoxClick() to be the var named Stanley mentioned in the javascript, but i cant seem to do it, anyone know what i need to do???