innerHTML
Posted: Tue Nov 25, 2003 5:54 am
I am using the innerHTML property to change text in a layer.
Here is the code
which is executed when this link is clicked
and the layer that is updated is
Everthing works okay, i click the link and the text appears. What i want to do though, is when the link is clicked again, the text dissapears. I don't know how to make the link do two different things.
Cheerz
Mark
Here is the code
Code: Select all
<SCRIPT>
function insertScript()
{
var sHTML="<ul><li class="body">4-cylinder 140hp 4.5 litre.</li><li class="body">6-cylinder 185hp 6.8 litre.</li></ul>";
ScriptDiv.innerHTML = sHTML;
}
</SCRIPT>Code: Select all
<a href="javascript:insertScript();">Latest John Deere PowerTech Engines</a>Code: Select all
<DIV ID="ScriptDiv"></DIV>Cheerz
Mark