Monday 11 April 2005 6:14:33 am
Hi Luke! As I found no answer to this question, I decided to first put the content into seperate spans, and then switch the content of the div with that of the desired span. This works great, but gives me a set with extra spans (which are hidden of course). Anyways: the code of my original plan is this:
<script type="text/javascript">
<!--
// Endre tekst på branner
var allFires= new Array(2000);
{section name=Fire loop=$branner}
{*$Fire:item.data_map|attribute(show)*}
allFires[{$Fire:item.data_map.year.content}] = "<strong>{$Fire:item.data_map.title.content}</strong><p>{$Fire:item.data_map.description.data_text|break}</p>";
{/section}
{literal}
function changeText(year) {
document.all.branntekst.innerHTML = allFires[year];
}
{/literal}
//-->
</script>
Would be great if it was doable! Felix
Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com
|