PDA

Click to See Complete Forum and Search --> : an .onLoad handler "that gets the xml doc as a param" - sorta?



sgutfreund
05-15-2001, 11:02 AM
I would like to write a generic "onLoad" routine that handles and dispatches results for a variety of XML documents that are doing loads:

I.e.

function login () {
loginDoc = new XML();
loginDoc.onload = this.valueOf().loginDone; loginDoc.load("..."); } //

function loginDone () {
// code to discover the xml doc that called this onload
process(xmldoc);
}

I guess what I would have liked is that macromedia returned both success, and the xml document as the parameters of the onload handler. What can be done to simulate this?


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dr. Yechezkal Gutfreund
Chief Scientist
Surgency(tm), Inc.
One Main Street
Cambridge, MA 02142 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

proleptic
06-15-2001, 04:11 PM
did you ever figure out how to do this? i'm having the same problem.

thanks,
-l

VAYKENT
06-18-2001, 04:01 PM
I guess I'm at a loss as to why you would need something of that nature....

You'd only be saving 4 or 5 lines of code... unless I misunderstood your question...

sgutfreund
06-18-2001, 05:26 PM
Well, my original post was about having a
single, generic send and receive utility, that
would be called with the xml doc as a parameter, and
then would call back the originator.

I figured out a while back how to do this.

I now have a movie called FlashTalk which
has an entry point called flashtalk.ivory()

It takes an xml movie as a parameter, and then
name of a callback function.

When the xml arrives, it does a callback.
It was not simple to figure out. See

VAYKENT
06-19-2001, 02:46 AM
Ok!