473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 2571
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.returnValue
property which the parent form will get as a return value of the
showModalDialog call.

Eliyahu

"mark" <ma**@remove.com> wrote in message
news:11***************@spandrell.news.uk.clara.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.returnValue
property which the parent form will get as a return value of the
showModalDialog call.

Eliyahu

"mark" <ma**@remove.com> wrote in message
news:11***************@spandrell.news.uk.clara.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.com> wrote in message
news:Ov**************@TK2MSFTNGP14.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.returnValue
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.com> wrote in message
news:Ov**************@TK2MSFTNGP14.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.returnValue
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
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...
14
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...
1
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...
1
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...
3
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
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...
3
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...
1
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.