dynapi.library is for loading JavaScript files only. I have a separate IOElement
object that is a scaled down LoadPanel for loading html files (which may include
scripts also). IOElement doesn't do any of the object/package associations that is
necessary in the library. I don't think it's necessary to combine the library and
IOElement, they are for distinctly different tasks. However, it may at some point be
necessary to combine their load queues (right now each have their own) in a similar
manner that LoadPanel had a separate load queue.
An IOElement example:
<script>
var io = new IOElement(true); // true means a hidden ioelement
dynapi.onLoad(init);
function init() {
io.load('file.html', fileload);
}
function fileload(e) {
alert(e.getSource().getScope().myvalue); // returns variable "myvalue" that is
defined in the file loaded
}
</script>
IOElement is more suitable for doing simple communication through adding arguments to
the URL - file.html?value1=1&value2=2. I have an example that will be included that
shows how to use it. For more complex communication it would be better to go with a
Frame communction scheme, or a java applet.
Dan Steinman
On Wed, Jan 09, 2002 at 06:44:07AM -0800, Raymond Irving wrote:
>
> --- Dan Steinman <[EMAIL PROTECTED]> wrote:
> > I going to try adding Michael's Java load mechanism
> > to the library so that you can have synchronous
> > loading (I believe that's what you meant by loading
> > a script when needed) using the same syntax.
> >
>
> If the above is possible then you could also add a
> function to load files (html, xml, js, etc) directly
> from the server.
>
> example:
>
> myfile = dynapi.library.getFile('/data/users.xml')
>
> --
> Raymond Irving
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/