• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this possible to get opener windows innertexts

 
Anil Verghese
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
var i=0;
var text=new String();
var mainWindow;

function Flow()
{
openPaymon();

}
function openWindow()
{
window.opener.location="www.google.com";
}

</script>
</HEAD>

<BODY onload='Flow()'>

</BODY>
</HTML>


1.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<script>



function waitForDocumentComplete()
{


text=parent.window.opener.document.body.innerText;

}
</script>
<BODY onload="javascript: window.open('C:\\Open.html'); ">

</BODY>
</HTML>


will this code work if no how do i fix this

Thanks
Anil
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript has a same domain policy. You can not see the contents of another window or frame if it is in another domain. It is to protect you.

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic