wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Is this possible to get opener windows innertexts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Is this possible to get opener windows innertexts" Watch "Is this possible to get opener windows innertexts" New topic
Author

Is this possible to get opener windows innertexts

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jan 10, 2002
Posts: 61458
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Is this possible to get opener windows innertexts