Fon
01-21-2008, 05:43 PM
I'm trying to create a menu outside of an object which can change its contents. Here's what I've got:
<script type="text/javascript">
function nouveauData()
{
document.getElementById('mediabox').setData("URL", new.html);
return false;
}
</script>
<div id="boite">
<object id="mediabox" type="text/html" data="thingie.html"></object>
<a id="precedent" href="index.html"></a>
<a id="suivant" href="" onclick="nouveauData()">uuok</a>
<a id="fermer" href="" onclick="document.getElementById('boite').style.display='none'; return false;"></a>
</div>
The java script funciont is supposed to change the "mediabox" data from "thingie.html" to "new.html", but nothing seems to be happenning. The method to close the window works fine however. I'm assuming I have a small syntax error. Any pointers?
Thanks.
<script type="text/javascript">
function nouveauData()
{
document.getElementById('mediabox').setData("URL", new.html);
return false;
}
</script>
<div id="boite">
<object id="mediabox" type="text/html" data="thingie.html"></object>
<a id="precedent" href="index.html"></a>
<a id="suivant" href="" onclick="nouveauData()">uuok</a>
<a id="fermer" href="" onclick="document.getElementById('boite').style.display='none'; return false;"></a>
</div>
The java script funciont is supposed to change the "mediabox" data from "thingie.html" to "new.html", but nothing seems to be happenning. The method to close the window works fine however. I'm assuming I have a small syntax error. Any pointers?
Thanks.