Well, it's not exactly wrong. Looks like an IE quirk to me. But I
suppose we can just move the element anyway.

-Matej

On Tue, Sep 8, 2009 at 11:10 PM, Matej Knopp<matej.kn...@gmail.com> wrote:
> Hi,
>
> can you create jira issue with problem description? The code indeed
> looks wrong I can fix it once the issue is created.
>
> -Matej
>
> On Tue, Sep 8, 2009 at 9:59 PM, Heikki
> Uotinen<heikki.uoti...@syncrontech.com> wrote:
>> There is a "bug" in wicket-ajax.js:268 (1.4.1) that breaks 
>> IE+Flash/ExternalInterface:
>>
>>        // place all newly created elements before the old element
>>        while(tempParent.childNodes.length > 0) {
>>                var tempElement = tempParent.childNodes[0];
>>>>>>>           tempParent.removeChild(tempElement); <<<<<
>>                parent.insertBefore(tempElement, element);
>>                tempElement = null;
>>        }
>>
>> Calling removeChild is not needed because insertBefore moves element from 
>> its original place.
>> If you remove "removeChild" line and check "tempParent.childNodes.length" 
>> you can see that it is
>> decreased by one after "insertBefore".
>>
>> This "removeChild" breaks Flash/ExternalInterface in IE. If "removeChild" is 
>> removed then everything
>> works fine. IE is more strict here than other browsers.
>>
>> Demonstration is still at (there is no need for Flash CS4 to test this)
>>
>> http://download.syncrontech.com/public/quickstart_noname.zip
>>
>>
>> Could someone confirm this and suggest how to proceed ?
>>
>>
>> -Heikki
>>
>>
>> -----Original Message-----
>> From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com]
>> Sent: 7. syyskuuta 2009 9:21
>> To: users@wicket.apache.org
>> Subject: RE: Flash/ExternalInterface does not work in IE if movie is fetched 
>> via Wicket/Ajax
>>
>> There is a problem with IE/ExternalInterface if movie is added to DOM f.ex 
>> appendChild
>> JavaScript functions are called but they do not return any value.
>>
>> This is clearly MS problem but could IE specific function in wicket-ajax.js 
>> be adjusted somehow ?
>>
>> Simple test case has
>>
>>        var flashMovie = '<OBJECT id="testId" codeBase="http://fpdownload..
>>
>>        // Works in IE and FF
>>                document.getElementById("testdiv").innerHTML = flashMovie;
>>
>>        // ExternalInterface.call calls JS but does not return value in IE. 
>> Works in FF
>>        var tempDiv = document.createElement("div");
>>        tempDiv.innerHTML = flashMovie;
>>        document.body.appendChild(tempDiv);
>>
>> Here is complete code (ajax.swf can be found in zip files)
>>
>> http://pastebin.com/fbc0aa9a
>>
>> Here is AS3 code in ajax.fla
>>
>> http://pastebin.com/d4efd47b
>>
>>
>> -Heikki
>>
>> -----Original Message-----
>> From: Mikko Pukki [mailto:mikko.pu...@syncrontech.com]
>> Sent: 4. syyskuuta 2009 15:33
>> To: users@wicket.apache.org
>> Subject: Flash/ExternalInterface does not work in IE if movie is fetched via 
>> Wicket/Ajax
>>
>> Hi,
>>
>> This example demonstrates that ExternalInterface fails with IE only if movie 
>> is fetched via Wicket/Ajax.
>>
>> ajaxtest.zip:
>> (http://download.syncrontech.com/public/ajaxtest.zip)
>>
>> Page "first.html" fetches "second.html" page via Ajax. Second.html has Flash 
>> movie
>> that calls JavaScript methods with ExternalInterface and produces output
>> "Start..."
>> "ExternalInterface.available:true"
>> "ExternalInterface.objectID:testId"
>> "fromJs:text from js (first.html)"
>>
>> This works both FF 3.5 and IE 7/IE8
>>
>>
>> quickstart_noname.zip:
>> (http://download.syncrontech.com/public/quickstart_noname.zip)
>>
>> Same demonstration with wicket. This fails with IE
>>
>> "Start..."
>> "ExternalInterface.available:true"
>> "ExternalInterface.objectID:null"
>> "fromJs:null"
>>
>> ObjectId is null and JavaScript call does not return any value.
>>
>> We are aware about EI/IE problems in past, but any of those does not seem to 
>> fit here.
>>
>> Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5
>>
>> Has anyone encountered any similar behavior and/or has found any workaround?
>> Should I create a Jira issue?
>>
>>
>> ------------------
>> Mikko Pukki
>> Syncron Tech Oy
>> Laserkatu 6
>> 53850 Lappeenranta
>> +358 400 757 178
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to