I don't know about using sethtml... if you are loading
something into a loadpanel in IE it everything except
the innerHTML of the body tag (so style info in the
head, bgcolor on the body etc). it also ignores any
inline scripts and styles. the only scripts that get
executed are events, so onclicks still work inside the
loadpanel. netscape on the other hand will let you
include scripts and css files etc.

--- Al Byers <[EMAIL PROTECTED]> wrote: > How
does one access Javascript variables in the
> LoadPanel? I am confused
> as to what I should be looking for. I found a way to
> do it in Netscape
> (see example below), but I don't know why it works.
> In the example, I
> don't use setURL, just setHTML, so I guess the
> question does not depend
> on LoadPanel - it could just as easily be a DynLayer
> object. Is there a
> method that I am missing?
> 
> <<<<<<<<<<<<<<<<<<<EXAMPLE>>>>>>>>>>>>>>>>>>
> <HTML><HEAD>
> <!-- will have to change for your environment -->
> <script language="Javascript"
> src="/dynapi/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('');
> DynAPI.include('dynapi.api.*');
> DynAPI.include('dynapi.gui.loadpanel.js');
> </script>
> 
> <script language="Javascript">
> DynAPI.onLoad=function() {
>         $go_dynobj = new LoadPanel();
>         $go_dynobj.setHTML("no file loaded");
> 
>         $go_dynobj.setSize(250,50); // height will
> be overwritten by
> default
>         $go_dynobj.moveTo(100,100);
>         $go_dynobj.setBgColor('yellow');
> 
>         counter = 0;
>         var el = new EventListener($go_dynobj);
>         el.onload = function(e) {
>                 status = 'got load event '+
> counter++;
>                 var $targ = e.getTarget();
>                 alert("testvar:" +
> $targ.elm.$testvar); //This works for
> Netscape. Why?
>         }
>         $go_dynobj.addEventListener(el);
> 
>         DynAPI.document.addChild($go_dynobj);
> 
>    return;
> }
> 
> function go( )
> {
>  var $s = '<html><head><script
> language="javascript">var
> $testvar="OK";\x3C/script>'
>   + '</head><body >'
>   + 'HERE I AM'
>   + '</body></html>';
> 
>  $go_dynobj.setHTML($s);
>    return;
> }
> </SCRIPT>
> </HEAD>
> <BODY BGCOLOR="white" >
> <a href="javascript:go()">Load Panel</a>
> </BODY>
> </HTML>
> <<<<<<<<<<<<<<<<<<END OF EXAMPLE>>>>>>>>>>>>>>>>>>
> 
> --
> Al Byers
> Local Square, Inc.
> 826 N. Augusta St.
> Staunton, VA 24401
> 540.213.0500
> www.localsquare.com
> [EMAIL PROTECTED]
> 
> 
> 
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
>
http://lists.sourceforge.net/lists/listinfo/dynapi-help
> 
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to