Maybe the workaround is to remove the old node, before overwriting it? I
am currently just setting oldObjectNode.outerHTML = newObject.outerHTML.
We might have to remove the old node completely, then reinsert it (in
the correct position in the DOM).
Actually, it's probably worth testing if the script is running at all
when you set up your error condition (and whether the script has access
to the DOM if it does run - an alert(document.body.innerHTML); should
do). I think that you may have found a critical bug in the deferred
script technique. I have noticed intermittent strange behavior with
using deffered scripts with IE on other projects.
Another solution might be to just suffer the extra load time (waiting
for images and such), and use the document.onactivate event or
document.onbeforeactivate, which fires before onload. I think right
before it, which means after all the images load - actually, I'm not
even sure it waits until the DOM is ready... If my assumptions about
when this fires are correct, it will take longer to load than the defer
method, but will still happen before onload, so onload scripting should
still be safe.
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onactivate.asp
Then there's the old ondocumentready trick..
This is still related to Flash in a round about way, but it more about
JScript ActiveX and IE than it is about Flash at this point. I'll let
you guys decide if this should continue on the list...
Kevin N.
Tom Lee wrote:
Really I wasn't considering the delay as a real solution. It was just
something I was using to probe for clues.
"the embedded object cannot exist prior to the
onload event firing or it will require activation. Period."
Actually, that's not true. The only time it DOES require activation when
inserted by a deferred script (<script defer src="whatever.js"></script>) is
if the user clears their cache and revisits the page without restarting
their browser first. It is this edge case for which I am seeking a
workaround.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ryanm
Sent: Wednesday, June 14, 2006 5:20 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Eolas "fix" and backspace key flash bug
Perhaps there is a magic sweet spot between the execution
of deferred scripts and window.onload when elements can be inserted into
the
document without "click to activate".
There's no magic there, the embedded object cannot exist prior to the
onload event firing or it will require activation. Period. Don't use a
delay, use the onload event. A delay is unpredictable because you are
working on the client side, where bandwidth, network congestion, and the
size of the images and other files loaded into the page will cause the
amount of time before the onload event fires to vary drastically. To state
that more clearly, you will *never* accomplish this in any predictable way
using a time delay, not even if you make the delay over 1 minute, because
somewhere there is still a guy using a 14.4 modem.
ryanm
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com