javascript - how to use element from pop up window in parent page -


this parent html

<html>  <script language="javascript">   function openwindow()  {  window.open("popups.html","_blank","height=200,width=400,status=yes,toolbar=no,menubar=no,location=no")  }  </script>  <body>  <form name=frm>  <input id=text1 type=text>  <input type=button onclick="javascript:openwindow()" value="open window..">  </form>  </body>  </html> 

this child html

 <html>  <script language="javascript">  function changeparent()  {  window.opener.document.getelementbyid('text1').value="value changed..";  }  </script>  <body>  <form>  <input type=button onclick="javascript:changeparent()" value="change opener's textbox's value..">  </form>  </body>  </html> 

i need access element pop window(i.e child element). code above access element parent window. doesn't work. please

blocked frame origin "null" accessing frame origin "null"

security restrictions prevent webpages loaded hard disk accessing other web pages loaded hard disk.

install web server , access them via http.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -