Hi,
I am trying to display a link, which when clicked will eventually start an image slideshow, the link contents will change to 'Pause' and when the changed link is clicked again, the original link content 'View slideshow' is restored.
Using the code below, I am able to perform the first content change, but I am struggling to work out how to restore the link back to its original content.
If someone can offer some advice on this then I would be very grateful.
<html>
<head>
<script type="text/JavaScript">
function setLinkContent(link, content)
{
if (document.all)
{
link.innerText = content;
}
else if (document.getElementById)
{
link.firstChild.nodeValue = content;
}
}
</script>
</head>
<body>
<a href="#" onClick="setLinkContent(this, 'Pause');">View Slideshow</a>
</body>
</html>