From: Raymond I. <xw...@ya...> - 2003-09-23 12:55:47
|
DynAPI 3.0 has some new features that allows you to have greater control over your images. You might want to give 3.0 a try You cannot access inline layers until the page is fully loaded. That's how the browsers work but you can still checkout some of the new features of dynapi 3.0 to see if it will work for you. http://dynapi.sourceforge.net/snapshot/?N=D -- Raymond Irving --- Leif Wessman <lei...@ho...> wrote: > > 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 > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |