Getting the data back to the parent Page.

R

Ravi Kishore

Hi all,
I have a problem while sending the data to and fro a JSP page. When i
click a link on a JSP page(say parent.jsp), i have to open a diff
page(say child.jsp), get the data from that page and pass that data to
the parent.jsp and do some actions with the data i recently got.
I am not using window.open(...)..so i definitely can't use opener
object.
Also i can't use form.action(parent.jsp?...) as i have to do database
hits to open the parent.jsp again. i don't want to do it. Is there any
other way to do this.
Please help me in this regard,
Thanks in Advance,
Ravi.
 
E

Erwin Moller

Ravi said:
Hi all,
I have a problem while sending the data to and fro a JSP page. When i
click a link on a JSP page(say parent.jsp), i have to open a diff
page(say child.jsp), get the data from that page and pass that data to
the parent.jsp and do some actions with the data i recently got.
I am not using window.open(...)..so i definitely can't use opener
object.
Also i can't use form.action(parent.jsp?...) as i have to do database
hits to open the parent.jsp again. i don't want to do it. Is there any
other way to do this.
Please help me in this regard,
Thanks in Advance,
Ravi.

Hi Ravi,

Window1 contains parent.jsp
which opens a new window
Window2 that contains child.jsp.

Addressing Window1 from Window2:
If you want to access something in Window1 form Window2, you can always use
the reserved word: opener

opener.document.location='www.google.com';
is a valid way to address the opener window.

Addressing Window2 from Window1:
If you open from Window1 via window.open() that functions returns a
window-reference to Window2.
If you want to adres Window2 from Window1, use window.open() and remember
the value it return (the childwindowreference).

Regards,
Erwin Moller
 
T

Tom Cole

He mentioned that he's not using separate windows. He loading an
entirely new page into the same window...

You will most likely want to look into a hidden frame or hidden window
approach. This loads a page that always stays loaded in one frame (or
window) that can be used to pass information around.

Javascript is an interpreted language and is executed by the client
browser, therefore is must be loaded (in a currently active page) to
work.
 
R

Ravi Kishore

Tom said:
He mentioned that he's not using separate windows. He loading an
entirely new page into the same window...

You will most likely want to look into a hidden frame or hidden window
approach. This loads a page that always stays loaded in one frame (or
window) that can be used to pass information around.

Javascript is an interpreted language and is executed by the client
browser, therefore is must be loaded (in a currently active page) to
work.

Hey
That one is gud idea infact. Thanx for the idea.
I iwll get back to you, if I have any issue in implementing that.
Thanx once again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top