C
Chris Smith
The Situation:
I've got a frameset that loads two other pages in frames. Frame A
creates an object, and the FrameB needs to invoke a method on that
object.
The Problem:
How does Frame B find out when Frame A has finished creating the object?
If Frame A hasn't finished creating the object yet, I want Frame B to
wait, and invoke the method as soon as the object has been created. I
can find out IF the object has been created (test the variable for
undefined or null), but if it hasn't been created yet, I can't find a
way to wait and send the notification when it has.
I've looked around, but JavaScript doesn't seem to provide the
synchronization constructs that I'd use to solve this problem in other
languages.
I have control over all three pages (the frameset, and both frames), and
I suspect the solution is going to have something to do with code in the
frameset, since neither frame can deterministically interact with the
other... but how does it get done? Without some way to manage
concurrency, I don't see a way to let the two share state.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
I've got a frameset that loads two other pages in frames. Frame A
creates an object, and the FrameB needs to invoke a method on that
object.
The Problem:
How does Frame B find out when Frame A has finished creating the object?
If Frame A hasn't finished creating the object yet, I want Frame B to
wait, and invoke the method as soon as the object has been created. I
can find out IF the object has been created (test the variable for
undefined or null), but if it hasn't been created yet, I can't find a
way to wait and send the notification when it has.
I've looked around, but JavaScript doesn't seem to provide the
synchronization constructs that I'd use to solve this problem in other
languages.
I have control over all three pages (the frameset, and both frames), and
I suspect the solution is going to have something to do with code in the
frameset, since neither frame can deterministically interact with the
other... but how does it get done? Without some way to manage
concurrency, I don't see a way to let the two share state.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation