I'm new to Javascript and I want to pass values from my window to a new window. The new window was not programmed by me and it is already on the Web, so I cannot add/edit the code content of the Web page. The codes that I have on my window are below:
Code:
<script>
var NewWindow
function openNewWindow() {
NewWindow = window.open("http://www.webexample.com","NEW","resizable=yes");
}
</script>
My window's form is called "Form1" and the child window's form is called "EditForm". I have an ASP textbox called "Value" that I want to pass to the child window's textbox called "ValueDisplay" (Not an ASP textbox but an input type=text tag). The following codes is from the parent window to pass my value to the child's window value.
Code:
<script>
function test() {
NewWindow.opener.NewWindow.EditForm.ValueDisplay.value = document.getElementById("Value").value;
}
</script>
I keep get an access denied or permission denied error statement when I click the error message in the status bar.