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 / Languages / JScript / July 2005

Tip: Looking for answers? Try searching our database.

Passing variable data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam Samnah - 07 Jul 2005 00:34 GMT
I have a parent window with javascript and a child popup window with a form
in it.  I need to pass the information inputed in the form located on the
child window to variables in the parent window javascript.  I have tried
using opener but that only appears to pass input from a child window to a
parent window into form controls and not specific variables in a javascript
function.  Can someone suggest how to solve this issue?

Thank you in advance,

Sam
Anoop CM - 10 Jul 2005 12:13 GMT
write a function in the parent page which has the arguements u want to
recieve.
and set the variables inside the function  You can then call this function
from
the child window using opener.functionname

HTH
Anoop

> I have a parent window with javascript and a child popup window with a form
> in it.  I need to pass the information inputed in the form located on the
[quoted text clipped - 6 lines]
>
> Sam
Serge Baltic - 12 Jul 2005 16:33 GMT
SS> I have a parent window with javascript and a child popup window with
SS> a form in it.  I need to pass the information inputed in the form
SS> located on the child window to variables in the parent window
SS> javascript.  I have tried using opener but that only appears to pass
SS> input from a child window to a parent window into form controls and
SS> not specific variables in a javascript function.

The variables in a javascript functions are indeed LOCAL variables of that
function, and exist only while the function is being executed. Moreover,
a new set of variables is created each time it happens. Thus there's practically
no use of assigning them a permanent value.

However, if you declare some global variables in the parent window's javascript
— in the form:

var myvariable;

— they will be global and exist thru the page's life span. They may be accessed
as properties of the parent page's "window" object.

(H) Serge

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.