Hi,
How do I change the src of an image in a DynLayer (with javascript) - before the document is loaded? It seems as if DynAPI.document is not accessible. Is there a way to make it accessible or how should I do it???
Please not that It's not possible for me to wait until the page is fully loaded. I have to change the image before...
Thank you for your help!!
This is my code:
<html>
<head>
<script language="JavaScript" src="/js/dynapi.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
DynAPI.setLibraryPath('/js/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.ext.inline.js');
//-->
</script>
</head>
<div id="mylayer" style="position:absolute">
<img name="myimage" src="/box.empty.gif">
</div>
<script language="JavaScript" type="text/javascript">
<!--
// it seems as if the DynAPI.document does not exist
DynAPI.findLayers(DynAPI.document);
// and that's the reason that I can't change the image in the layer DynAPI.document.all["mylayer"].images['myimage'].src = '/box.check.gif'; //--> </script> </html>
Leif
_________________________________________________________________ L�ttare att hitta dr�mresan med MSN Resor http://www.msn.se/resor/
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help
