Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've tried that, it ain't work. I'm posting the code</p> <h2>test.html</h2> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Chat&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="chatMessages"&gt;&lt;/div&gt; &lt;script&gt; var newWin = null; var OpenWindow = null; function popUp(strURL, strType, strHeight, strWidth) { if (newWin != null &amp;&amp; !newWin.closed) newWin.close(); var strOptions=""; if (strType=="console") strOptions="resizable,height="+ strHeight+",width="+strWidth; if (strType=="fixed") strOptions="status,height="+ strHeight+",width="+strWidth; if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,"+ "resizable,location,height="+ strHeight+",width="+strWidth; alert(window.parent.document.getElementById(window.name)); newWin = window.open(strURL, 'alertWindow', strOptions); //newWin.document.getElementById("child").value='Str'; newWin.focus(); // send_data(data); } function chat() { popUp('../alert.jsp','console',250,600); } &lt;/script&gt; &lt;form name="AlertReceiverOnHeader" onclick="chat()"&gt; &lt;input type="text" value="teast" id="teast" name="teast"/&gt; &lt;/form&gt; &lt;/html&gt; </code></pre> <h2>child.html</h2> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;Alert&lt;/title&gt; &lt;/head&gt; &lt;body onload="load()"&gt; &lt;script language="JavaScript"&gt; function load() { alert('In load'); alert("001="+window.parent.document.getElementById('teast')); alert("002="+window.parent.document.getElementById(window.name)); alert("003="+window.opener.document.getElementById('teast').value); } &lt;/script&gt; &lt;form name="child"&gt; &lt;input type="text" id="child" value="child"/&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload