You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Tom Desmet (JIRA)" <ji...@apache.org> on 2008/01/03 16:18:33 UTC
[jira] Created: (WICKET-1257) iframe get request done 2x after ajax
change in IE
iframe get request done 2x after ajax change in IE
--------------------------------------------------
Key: WICKET-1257
URL: https://issues.apache.org/jira/browse/WICKET-1257
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.3.0-final, 1.3.0-rc2
Environment: All platforms / Internet Explorer
Reporter: Tom Desmet
http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
We have a page that has an iframe and an ajax button.
When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
We have encountered the phenomenon where the iframe src is requested
two times to the server after the button gets clicked.
After some debugging, the problem was pinned down and
lies within the file org\apache\wicket\ajax\wicket-ajax.js
The problem is within the function "replaceOuterHtmlIE".
There is some kind of "hack" to read the <script> tags within the received html...
First the content of the div is filled with a table containing received ajax component markup:
tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
We patched this the following way ...
The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
After the script tags are retrieved, the table gets removed from the structure,
and the div within the table is connected to tempDiv.
var table=tempDiv.firstChild;
var childDiv=table.firstChild.firstChild;
tempDiv.removeChild(table);
tempDiv.appendChild(childDiv);
Would it be possible to apply this patch to the next wicket version?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1257) iframe get request done 2x after ajax
change in IE
Posted by "Tom Desmet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Desmet updated WICKET-1257:
-------------------------------
Your patch (Rev. 611477) works fine. Thank you very much!
This bug can be closed.
> iframe get request done 2x after ajax change in IE
> --------------------------------------------------
>
> Key: WICKET-1257
> URL: https://issues.apache.org/jira/browse/WICKET-1257
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc2, 1.3.0-final
> Environment: All platforms / Internet Explorer
> Reporter: Tom Desmet
> Assignee: Matej Knopp
>
> http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
> We have a page that has an iframe and an ajax button.
> When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
> We have encountered the phenomenon where the iframe src is requested
> two times to the server after the button gets clicked.
> After some debugging, the problem was pinned down and
> lies within the file org\apache\wicket\ajax\wicket-ajax.js
> The problem is within the function "replaceOuterHtmlIE".
> There is some kind of "hack" to read the <script> tags within the received html...
> First the content of the div is filled with a table containing received ajax component markup:
>
> tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
> This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
> tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
> Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
> We patched this the following way ...
> The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
> tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
> After the script tags are retrieved, the table gets removed from the structure,
> and the div within the table is connected to tempDiv.
> var table=tempDiv.firstChild;
> var childDiv=table.firstChild.firstChild;
> tempDiv.removeChild(table);
> tempDiv.appendChild(childDiv);
> Would it be possible to apply this patch to the next wicket version?
> We experienced some problems with the patch, below is the updated version that we use.
> var table=tempDiv.firstChild;
> tempDiv.removeChild(table);
> if(tempDiv.childNodes.length==0) {
> var childDiv=table.firstChild.firstChild;
> table.firstChild.removeChild(childDiv);
> tempDiv.appendChild(childDiv);
> }
> else {
> tempDiv.removeChild(tempDiv.lastChild); // slash table
> tempDiv.removeChild(tempDiv.lastChild); // div
> var childDiv=document.createElement("div");
> childDiv.style.display="none";
> var child;
> while(tempDiv.childNodes.length>0) {
> child=tempDiv.firstChild;
> tempDiv.removeChild(child);
> childDiv.appendChild(child);
> }
> tempDiv.appendChild(childDiv);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1257) iframe get request done 2x after ajax
change in IE
Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Frank Bille Jensen updated WICKET-1257:
---------------------------------------
Fix Version/s: 1.3.1
> iframe get request done 2x after ajax change in IE
> --------------------------------------------------
>
> Key: WICKET-1257
> URL: https://issues.apache.org/jira/browse/WICKET-1257
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc2, 1.3.0-final
> Environment: All platforms / Internet Explorer
> Reporter: Tom Desmet
> Assignee: Matej Knopp
> Fix For: 1.3.1
>
>
> http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
> We have a page that has an iframe and an ajax button.
> When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
> We have encountered the phenomenon where the iframe src is requested
> two times to the server after the button gets clicked.
> After some debugging, the problem was pinned down and
> lies within the file org\apache\wicket\ajax\wicket-ajax.js
> The problem is within the function "replaceOuterHtmlIE".
> There is some kind of "hack" to read the <script> tags within the received html...
> First the content of the div is filled with a table containing received ajax component markup:
>
> tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
> This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
> tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
> Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
> We patched this the following way ...
> The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
> tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
> After the script tags are retrieved, the table gets removed from the structure,
> and the div within the table is connected to tempDiv.
> var table=tempDiv.firstChild;
> var childDiv=table.firstChild.firstChild;
> tempDiv.removeChild(table);
> tempDiv.appendChild(childDiv);
> Would it be possible to apply this patch to the next wicket version?
> We experienced some problems with the patch, below is the updated version that we use.
> var table=tempDiv.firstChild;
> tempDiv.removeChild(table);
> if(tempDiv.childNodes.length==0) {
> var childDiv=table.firstChild.firstChild;
> table.firstChild.removeChild(childDiv);
> tempDiv.appendChild(childDiv);
> }
> else {
> tempDiv.removeChild(tempDiv.lastChild); // slash table
> tempDiv.removeChild(tempDiv.lastChild); // div
> var childDiv=document.createElement("div");
> childDiv.style.display="none";
> var child;
> while(tempDiv.childNodes.length>0) {
> child=tempDiv.firstChild;
> tempDiv.removeChild(child);
> childDiv.appendChild(child);
> }
> tempDiv.appendChild(childDiv);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-1257) iframe get request done 2x after
ajax change in IE
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reassigned WICKET-1257:
-------------------------------------
Assignee: Matej Knopp
> iframe get request done 2x after ajax change in IE
> --------------------------------------------------
>
> Key: WICKET-1257
> URL: https://issues.apache.org/jira/browse/WICKET-1257
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc2, 1.3.0-final
> Environment: All platforms / Internet Explorer
> Reporter: Tom Desmet
> Assignee: Matej Knopp
>
> http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
> We have a page that has an iframe and an ajax button.
> When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
> We have encountered the phenomenon where the iframe src is requested
> two times to the server after the button gets clicked.
> After some debugging, the problem was pinned down and
> lies within the file org\apache\wicket\ajax\wicket-ajax.js
> The problem is within the function "replaceOuterHtmlIE".
> There is some kind of "hack" to read the <script> tags within the received html...
> First the content of the div is filled with a table containing received ajax component markup:
>
> tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
> This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
> tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
> Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
> We patched this the following way ...
> The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
> tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
> After the script tags are retrieved, the table gets removed from the structure,
> and the div within the table is connected to tempDiv.
> var table=tempDiv.firstChild;
> var childDiv=table.firstChild.firstChild;
> tempDiv.removeChild(table);
> tempDiv.appendChild(childDiv);
> Would it be possible to apply this patch to the next wicket version?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1257) iframe get request done 2x after ajax
change in IE
Posted by "Tom Desmet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Desmet updated WICKET-1257:
-------------------------------
Description:
http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
We have a page that has an iframe and an ajax button.
When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
We have encountered the phenomenon where the iframe src is requested
two times to the server after the button gets clicked.
After some debugging, the problem was pinned down and
lies within the file org\apache\wicket\ajax\wicket-ajax.js
The problem is within the function "replaceOuterHtmlIE".
There is some kind of "hack" to read the <script> tags within the received html...
First the content of the div is filled with a table containing received ajax component markup:
tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
We patched this the following way ...
The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
After the script tags are retrieved, the table gets removed from the structure,
and the div within the table is connected to tempDiv.
var table=tempDiv.firstChild;
var childDiv=table.firstChild.firstChild;
tempDiv.removeChild(table);
tempDiv.appendChild(childDiv);
Would it be possible to apply this patch to the next wicket version?
We experienced some problems with the patch, below is the updated version that we use.
var table=tempDiv.firstChild;
tempDiv.removeChild(table);
if(tempDiv.childNodes.length==0) {
var childDiv=table.firstChild.firstChild;
table.firstChild.removeChild(childDiv);
tempDiv.appendChild(childDiv);
}
else {
tempDiv.removeChild(tempDiv.lastChild); // slash table
tempDiv.removeChild(tempDiv.lastChild); // div
var childDiv=document.createElement("div");
childDiv.style.display="none";
var child;
while(tempDiv.childNodes.length>0) {
child=tempDiv.firstChild;
tempDiv.removeChild(child);
childDiv.appendChild(child);
}
tempDiv.appendChild(childDiv);
}
was:
http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
We have a page that has an iframe and an ajax button.
When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
We have encountered the phenomenon where the iframe src is requested
two times to the server after the button gets clicked.
After some debugging, the problem was pinned down and
lies within the file org\apache\wicket\ajax\wicket-ajax.js
The problem is within the function "replaceOuterHtmlIE".
There is some kind of "hack" to read the <script> tags within the received html...
First the content of the div is filled with a table containing received ajax component markup:
tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
We patched this the following way ...
The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
After the script tags are retrieved, the table gets removed from the structure,
and the div within the table is connected to tempDiv.
var table=tempDiv.firstChild;
var childDiv=table.firstChild.firstChild;
tempDiv.removeChild(table);
tempDiv.appendChild(childDiv);
Would it be possible to apply this patch to the next wicket version?
> iframe get request done 2x after ajax change in IE
> --------------------------------------------------
>
> Key: WICKET-1257
> URL: https://issues.apache.org/jira/browse/WICKET-1257
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc2, 1.3.0-final
> Environment: All platforms / Internet Explorer
> Reporter: Tom Desmet
> Assignee: Matej Knopp
>
> http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
> We have a page that has an iframe and an ajax button.
> When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
> We have encountered the phenomenon where the iframe src is requested
> two times to the server after the button gets clicked.
> After some debugging, the problem was pinned down and
> lies within the file org\apache\wicket\ajax\wicket-ajax.js
> The problem is within the function "replaceOuterHtmlIE".
> There is some kind of "hack" to read the <script> tags within the received html...
> First the content of the div is filled with a table containing received ajax component markup:
>
> tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
> This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
> tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
> Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
> We patched this the following way ...
> The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
> tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
> After the script tags are retrieved, the table gets removed from the structure,
> and the div within the table is connected to tempDiv.
> var table=tempDiv.firstChild;
> var childDiv=table.firstChild.firstChild;
> tempDiv.removeChild(table);
> tempDiv.appendChild(childDiv);
> Would it be possible to apply this patch to the next wicket version?
> We experienced some problems with the patch, below is the updated version that we use.
> var table=tempDiv.firstChild;
> tempDiv.removeChild(table);
> if(tempDiv.childNodes.length==0) {
> var childDiv=table.firstChild.firstChild;
> table.firstChild.removeChild(childDiv);
> tempDiv.appendChild(childDiv);
> }
> else {
> tempDiv.removeChild(tempDiv.lastChild); // slash table
> tempDiv.removeChild(tempDiv.lastChild); // div
> var childDiv=document.createElement("div");
> childDiv.style.display="none";
> var child;
> while(tempDiv.childNodes.length>0) {
> child=tempDiv.firstChild;
> tempDiv.removeChild(child);
> childDiv.appendChild(child);
> }
> tempDiv.appendChild(childDiv);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1257) iframe get request done 2x after
ajax change in IE
Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558289#action_12558289 ]
Matej Knopp commented on WICKET-1257:
-------------------------------------
I have committed a fix but a different than you suggest. Problem with your suggestion is that you are trying to reuse DOM tree created with the first innerHTML. But the tree is invalid and often lacks certain elements (or certain other are wrong).
Would be great if you could try the current trunk and let me know if it solves your problem.
> iframe get request done 2x after ajax change in IE
> --------------------------------------------------
>
> Key: WICKET-1257
> URL: https://issues.apache.org/jira/browse/WICKET-1257
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc2, 1.3.0-final
> Environment: All platforms / Internet Explorer
> Reporter: Tom Desmet
> Assignee: Matej Knopp
>
> http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
> We have a page that has an iframe and an ajax button.
> When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
> We have encountered the phenomenon where the iframe src is requested
> two times to the server after the button gets clicked.
> After some debugging, the problem was pinned down and
> lies within the file org\apache\wicket\ajax\wicket-ajax.js
> The problem is within the function "replaceOuterHtmlIE".
> There is some kind of "hack" to read the <script> tags within the received html...
> First the content of the div is filled with a table containing received ajax component markup:
>
> tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
> This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
> tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
> Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
> We patched this the following way ...
> The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
> tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
> After the script tags are retrieved, the table gets removed from the structure,
> and the div within the table is connected to tempDiv.
> var table=tempDiv.firstChild;
> var childDiv=table.firstChild.firstChild;
> tempDiv.removeChild(table);
> tempDiv.appendChild(childDiv);
> Would it be possible to apply this patch to the next wicket version?
> We experienced some problems with the patch, below is the updated version that we use.
> var table=tempDiv.firstChild;
> tempDiv.removeChild(table);
> if(tempDiv.childNodes.length==0) {
> var childDiv=table.firstChild.firstChild;
> table.firstChild.removeChild(childDiv);
> tempDiv.appendChild(childDiv);
> }
> else {
> tempDiv.removeChild(tempDiv.lastChild); // slash table
> tempDiv.removeChild(tempDiv.lastChild); // div
> var childDiv=document.createElement("div");
> childDiv.style.display="none";
> var child;
> while(tempDiv.childNodes.length>0) {
> child=tempDiv.firstChild;
> tempDiv.removeChild(child);
> childDiv.appendChild(child);
> }
> tempDiv.appendChild(childDiv);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1257) iframe get request done 2x after ajax
change in IE
Posted by "Tom Desmet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom Desmet closed WICKET-1257.
------------------------------
Resolution: Fixed
Your patch (Rev. 611477) works fine. Thank you very much!
> iframe get request done 2x after ajax change in IE
> --------------------------------------------------
>
> Key: WICKET-1257
> URL: https://issues.apache.org/jira/browse/WICKET-1257
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-rc2, 1.3.0-final
> Environment: All platforms / Internet Explorer
> Reporter: Tom Desmet
> Assignee: Matej Knopp
>
> http://www.nabble.com/bug%3A-iframe-get-request-done-2x-after-ajax-change-in-IE-to14598132.html
> We have a page that has an iframe and an ajax button.
> When the ajax button is clicked, the iframe is replaced by a new iframe with specific src.
> We have encountered the phenomenon where the iframe src is requested
> two times to the server after the button gets clicked.
> After some debugging, the problem was pinned down and
> lies within the file org\apache\wicket\ajax\wicket-ajax.js
> The problem is within the function "replaceOuterHtmlIE".
> There is some kind of "hack" to read the <script> tags within the received html...
> First the content of the div is filled with a table containing received ajax component markup:
>
> tempDiv.innerHTML = '<table style="display:none">' + text + '</table>';
> This way script tags can be retrieved. Afterwards the innerHTML is replaced by a div containing received text.
> tempDiv.innerHTML = '<div style="display:none">' + text + '</div>';
> Both statements cause IE to fetch the urls within the contained text (in our case <iframe src="someurl"></iframe> tags).
> We patched this the following way ...
> The first occurence of tempDiv.innerHTML, The content of the div is filled with a table containing a div.
> tempDiv.innerHTML = '<table style="display:none"><div style="display:none">' + text + '</div></table>';
> After the script tags are retrieved, the table gets removed from the structure,
> and the div within the table is connected to tempDiv.
> var table=tempDiv.firstChild;
> var childDiv=table.firstChild.firstChild;
> tempDiv.removeChild(table);
> tempDiv.appendChild(childDiv);
> Would it be possible to apply this patch to the next wicket version?
> We experienced some problems with the patch, below is the updated version that we use.
> var table=tempDiv.firstChild;
> tempDiv.removeChild(table);
> if(tempDiv.childNodes.length==0) {
> var childDiv=table.firstChild.firstChild;
> table.firstChild.removeChild(childDiv);
> tempDiv.appendChild(childDiv);
> }
> else {
> tempDiv.removeChild(tempDiv.lastChild); // slash table
> tempDiv.removeChild(tempDiv.lastChild); // div
> var childDiv=document.createElement("div");
> childDiv.style.display="none";
> var child;
> while(tempDiv.childNodes.length>0) {
> child=tempDiv.firstChild;
> tempDiv.removeChild(child);
> childDiv.appendChild(child);
> }
> tempDiv.appendChild(childDiv);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.