Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phantom_skulcave - 26 Oct 2007 11:37 GMT
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.
Alexey Smirnov - 26 Oct 2007 12:32 GMT
> 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
Phantom_skulcave - 27 Oct 2007 10:53 GMT
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. :)

>> 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 - 3 lines]
>
>try to use window.opener.document.getElementById("id_here").value
Kevin Spencer - 26 Oct 2007 12:34 GMT
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.

Signature

HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

> 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.
Phantom_skulcave - 27 Oct 2007 10:56 GMT
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.

>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
[quoted text clipped - 9 lines]
>>
>> Can someone please help?  Thanks, all.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.