[ 
https://issues.apache.org/jira/browse/WICKET-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067603#comment-13067603
 ] 

Andre L commented on WICKET-3869:
---------------------------------

Im not a javascript expert, but there seems to be an error in the javascript 
function Wicket.replaceOuterHtmlIE in wicket-ajax.js. There seems to be some 
special handling code for getting <script> tags inside the response that 
generate the first (aborted) request for the image resource. 

                // this is not exactly nice, but we need to get invalid markup 
inside innerHTML,
                // because otherwise IE just swallows the <script> tags 
(sometimes)     
                tempDiv.innerHTML = '<table style="display:none">' + 
markIframe(text) + '</table>';
                 
                ..
                        
                // now use regular div so that we won't mess the DOM
                tempDiv.innerHTML = '<div style="display:none">' + text + 
'</div>';

The second call to tempDiv.innerHTML happens after the browser has requested 
the image resource evaluated between the (invalid) <table></table> markup but 
before any server response is made, hence it cancels the request and make a new 
one. 

Delaying the execution just before "tempDiv.innerHTML = '<div 
style="display:none">' + text + '</div>'" until the first request for the image 
gets a server response removed the second call to the image and the resulting 
error on the serverside.

> ResponseIOException when ajax response contains resource reference
> ------------------------------------------------------------------
>
>                 Key: WICKET-3869
>                 URL: https://issues.apache.org/jira/browse/WICKET-3869
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC5.1
>         Environment: Internet Explorer
>            Reporter: Sodasmile
>              Labels: ResponseIOException, explorer, internet
>         Attachments: iwicket-no-image.tgz, iwicket.zip
>
>
> When ajax response (show modal window) contains shared image response, server 
> log reports ResponseIOException.
> See attached example application. Using maven, type mvn package jetty:run. 
> Open http://localhost/8080/iwicket/ in Internet Explorer, click the link, 
> watch server log (may need to open/close modal window a few times, but 
> usually appears on first attempt). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to