Easiest javascript code ever...but why can't I get it working?

  • Thread starter Thread starter Phantom_skulcave
  • Start date Start date
P

Phantom_skulcave

Hi all. I know you'll probably laugh at this, but I can't get a simple child
browser to get the information from the parent browser.

I'm familiar with JavaScript, but let's just say, not fluent (to put it
mildly).

I've seen examples that say this should work:

var a = document.FirstForm.TextBox3.value;
this.TextBox3.value = a

But it just won't transfer the data on 'OnLoad'.

Can someone please help? Thanks, all.
 
Hi all. I know you'll probably laugh at this, but I can't get a simple child
browser to get the information from the parent browser.

I'm familiar with JavaScript, but let's just say, not fluent (to put it
mildly).

I've seen examples that say this should work:

var a = document.FirstForm.TextBox3.value;
this.TextBox3.value = a

But it just won't transfer the data on 'OnLoad'.

Can someone please help? Thanks, all.

try to use window.opener.document.getElementById("id_here").value
 
What do you mean by "child browser?" If you're talking about a separate
browser window instance, there is only one way to get data to it on the
client side (from the server side, of course, you can pass it from the
server-side code). When the JavaScript window.open method is called, it
returns a handle to the child window. This allow the "parent" document
access to the child. The child window's opener property contains a reference
to the window that opened it.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 
Hi Alexey. Thank you so much for writing in, especially as the method worked
like a charm.

Thank you, thank you. I can get a nice night's sleep again. :)

Alexey said:
Hi all. I know you'll probably laugh at this, but I can't get a simple child
browser to get the information from the parent browser.
[quoted text clipped - 10 lines]
Can someone please help? Thanks, all.

try to use window.opener.document.getElementById("id_here").value
 
Hi Kevin. I do mean using the window.open function and transferring the
string from the parent's textbox to the child's textbox.

I got a solution from Alexey though, so thanks for writing but you can
disregard the question now.

Thanks again.

Kevin said:
What do you mean by "child browser?" If you're talking about a separate
browser window instance, there is only one way to get data to it on the
client side (from the server side, of course, you can pass it from the
server-side code). When the JavaScript window.open method is called, it
returns a handle to the child window. This allow the "parent" document
access to the child. The child window's opener property contains a reference
to the window that opened it.
Hi all. I know you'll probably laugh at this, but I can't get a simple
child
[quoted text clipped - 11 lines]
Can someone please help? Thanks, all.
 
Back
Top