There are quite a few issues regarding getting javascript to run in a
loadpanel, here are a few:
* Only things between the <body> tags are rendered, so put the script in the
body.
* use the defer property in the script tag, so:
<script defer></script>
* All script will refer to the main page, so if you want any dynapi, include
the dynapi files in the main page, not the page you're loading.
* it's hard to use loadpanel with script, and get it working on all
browsers. IE5 and IE5.5 differ, NS6 is very hard.
* Make sure the javascript to be loaded is inside functions, so it doesn't
start executing by itself, something like alert('blah') would fire before
the onload event.
Once those things are done, you can call the script from the onload event of
the loadpanel.
Check the faq and help-files on the home-page for more tips.
Cheers,
Richard Bennett
[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to DynAPI2.53)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi
----- Original Message -----
From: "Joćo Neves" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 13 July, 2001 23:09
Subject: [Dynapi-Help] Functions within a loadlayer
> Hi all.
>
> Any ideas on how I run a function which is dynamically loaded into a
> loadlayer?
> I've been trying things like <body onLoad=myFunction()>, but this just
> gets ignored. If I use the onload event in the loadlayer, I get an error
> saying that my function is not defined.
>
> Thanks in advance,
>
> -------------------------------------------
> Joćo Neves
> [EMAIL PROTECTED]
> Fabrica de Ideias
> SBS - Ed. Empire Center - bl. S - sala 508
> cep 70070-904 - Brasilia - DF - Brazil
> tel: (61) 321 1357
> fax: (61) 223 1712
> -------------------------------------------
>
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help