473,656 Members | 2,871 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing variable from child to parent - possible ?

I have a main form, and i have another form i need to call on a button
press,
then id like the result of the child form to pass data back to the parent -
without losing any data previously entered
on the parent - is this possible ? ( my main parent window is starting to
get quite cluttered)

cheers

mark
Nov 19 '05 #1
7 2590
mark wrote:
I have a main form, and i have another form i need to call on a button
press,
then id like the result of the child form to pass data back to the parent -
without losing any data previously entered
on the parent - is this possible ? ( my main parent window is starting to
get quite cluttered)

cheers

mark


The problem is in not losing the "parent" data... Are these windows open
in the same browser window or are you opening the "child" in a new
window? If its the same just save their existing data, in a
db/viewstate/session/etc, and then when you reload it retrieve it.
If not you will have to force the "parent" to postback to get it to
refresh, and with the viewstate enabled you should get the pre-entered
data to remain

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #2
Mark,

The standard way is to call javascript method showModalDialog for the child
form. The child form can pass back data in javascript window.returnVa lue
property which the parent form will get as a return value of the
showModalDialog call.

Eliyahu

"mark" <ma**@remove.co m> wrote in message
news:11******** *******@spandre ll.news.uk.clar a.net...
I have a main form, and i have another form i need to call on a button
press,
then id like the result of the child form to pass data back to the parent - without losing any data previously entered
on the parent - is this possible ? ( my main parent window is starting to
get quite cluttered)

cheers

mark

Nov 19 '05 #3
Mark,

The standard way is to call javascript method showModalDialog for the child
form. The child form can pass back data in javascript window.returnVa lue
property which the parent form will get as a return value of the
showModalDialog call.

Eliyahu

"mark" <ma**@remove.co m> wrote in message
news:11******** *******@spandre ll.news.uk.clar a.net...
I have a main form, and i have another form i need to call on a button
press,
then id like the result of the child form to pass data back to the parent - without losing any data previously entered
on the parent - is this possible ? ( my main parent window is starting to
get quite cluttered)

cheers

mark

Nov 19 '05 #4
> >

The problem is in not losing the "parent" data... Are these windows open
in the same browser window or are you opening the "child" in a new
window? If its the same just save their existing data, in a
db/viewstate/session/etc, and then when you reload it retrieve it.
If not you will have to force the "parent" to postback to get it to
refresh, and with the viewstate enabled you should get the pre-entered
data to remain

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com


looks like ill be forced to save on opening the child, either that i
redesign the whole form to be more modular
problem is - i have to pass an ID to the child that doesnt exist until the
parent is saved - so things are getting more complicated
than in reality they should be

cheers

mark
Nov 19 '05 #5

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:Ov******** ******@TK2MSFTN GP14.phx.gbl...
Mark,

The standard way is to call javascript method showModalDialog for the child form. The child form can pass back data in javascript window.returnVa lue
property which the parent form will get as a return value of the
showModalDialog call.

Eliyahu

got any examples ?

thanks

mark
Nov 19 '05 #6
> >

The problem is in not losing the "parent" data... Are these windows open
in the same browser window or are you opening the "child" in a new
window? If its the same just save their existing data, in a
db/viewstate/session/etc, and then when you reload it retrieve it.
If not you will have to force the "parent" to postback to get it to
refresh, and with the viewstate enabled you should get the pre-entered
data to remain

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com


looks like ill be forced to save on opening the child, either that i
redesign the whole form to be more modular
problem is - i have to pass an ID to the child that doesnt exist until the
parent is saved - so things are getting more complicated
than in reality they should be

cheers

mark
Nov 19 '05 #7

"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:Ov******** ******@TK2MSFTN GP14.phx.gbl...
Mark,

The standard way is to call javascript method showModalDialog for the child form. The child form can pass back data in javascript window.returnVa lue
property which the parent form will get as a return value of the
showModalDialog call.

Eliyahu

got any examples ?

thanks

mark
Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
6850
by: Mike M | last post by:
Is it possible? In the parent process, I have a socket that binds, listens and then accepts new connections (which creates new sockets in the process). I want to be able to pass some of these new sockets to a spawned process. Is it possible, and if so how? Any help is much appreciated!! Mike
14
1411
by: Larry Lindsey | last post by:
Aieeeeaiiieeaiiieii, ah think ah need some pro-zac For some reason, my object variables aren't keeping their values outside of the method scope. For instance, given: //Begin code class Parent{ public: Parent(){}
1
2407
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML GENERATED BY FUNCTION. Here'e the point: I'm writing a simple website for showing my photographs. It has a central page with many links (as many as galleries are).
1
317
by: mark | last post by:
I have a main form, and i have another form i need to call on a button press, then id like the result of the child form to pass data back to the parent - without losing any data previously entered on the parent - is this possible ? ( my main parent window is starting to get quite cluttered) cheers mark
3
3217
by: Maarten | last post by:
hi, how can i pass data from a parrentform to a childform and reverse or retreave data from a childform of the parentform and reverse. Regards Maarten
5
1300
by: Stephen Travis | last post by:
I'm trying to ReDim a child object after passing the parent object as System.Object and it throws a System.InvalidCastException: Cast from type 'Object()' to type 'ChildType()' is not valid. If I pass the parent object as its type, the ReDim succeeds. How can I ReDim a child object from a parent object passed as System.Object? Here's the problem... Private Sub Page_Load Dim NewParent As New ParentType addTwoChildrenSucceeds(NewParent)...
3
3875
by: luna | last post by:
i have a parent form which opens a child form, i need to pass a variable back to parent then reload parent so parentopens child, child passes to parent, child closes, parent reloads its only a single variable is this possible ?
1
2621
by: btreddy | last post by:
Hii all.., I have one query not able to find a solution. I've one javascript page(parent)on which upon clicking one link it willopen one more page(child page). here my question is how to set the value for a variable, which is there in the child window,once the user clicks on the link in parent window. I tried this.
0
8382
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8717
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8498
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7311
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1600
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.