By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

Getting the data back to the parent Page.

P: n/a
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.

Aug 31 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Ravi Kishore wrote:
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
Aug 31 '06 #2

P: n/a
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.

Aug 31 '06 #3

P: n/a
Tom Cole wrote:
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!

Aug 31 '06 #4

P: n/a
"Ravi Kishore" <in************@gmail.comwrote in
news:11**********************@m73g2000cwd.googlegr oups.com:
I have a problem while sending the data to and fro a JSP page.
Doesn't JSP stand for Java Server Page? Doesn't that mean the page comes
from a server running Java? Does this have anything to do with Javascript?
Aug 31 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.