Hey it's hard to understand what you want to do from this. Could you give us an idea of why this script you currently have isn't what you want? (just so we have somewhere to go from)...
Do you want to do something like this?:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<script language="javascript">
function toggleDiv(id, content)
{
var div = document.getElementById(id);
div.style.display = "block";
div.innerHTML = content;
}
</script>
</head>
<body>
<a href="javascript:toggleDiv('block', 'this is the first content//block');">Toggle Block</a>
<a href="javascript:toggleDiv('block', 'this is the second content//block');">Toggle Block</a>
<div id="block" style="display: none">randomstartcontent</div>
</body>
</html>
basically only have one paragraph of text visible? (This can be done in way many more ways, the above is just a quick mashup to work out what you actually want to do)
Cheers,
Jamey
Bookmarks