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.
Erwin Moller - 31 Aug 2006 11:28 GMT
> Hi all,
> I have a problem while sending the data to and fro a JSP page. When i
[quoted text clipped - 9 lines]
> 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
Tom Cole - 31 Aug 2006 12:13 GMT
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.
Ravi Kishore - 31 Aug 2006 12:51 GMT
> He mentioned that he's not using separate windows. He loading an
> entirely new page into the same window...
[quoted text clipped - 6 lines]
> 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!
Jim Land - 31 Aug 2006 23:14 GMT
> 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?