Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to pass datawindow retrieval arguments from one JSP page to another

0 views
Skip to first unread message

Nagui Fam

unread,
Jan 30, 2003, 10:48:21 PM1/30/03
to
Hello,
I have created a web page that is made of a frameset with two frames:
The top frame is basically a navigator that looks like tabs.
The bottom frame would load the appropriate JSP page, which contains a
datawindow with retrieval arguments, depending on which tab was selected
from the top frame.
The values of the retrieval arguments are supplied to the frameset from a
link on a datawindow on another JSP page.
Because a frameset does not accept page variables, what I am doing is I am
loading the jsp page that belongs to first tab in the bottom frame - that
works fine - which in turn loads the tabs html page - in the top frame -
passing it the required retrieval arguments for the rest of the tab pages.
Well, here were I fail. I end up with null arguments.
I am using the JavaScript method
window.top_frame.location= "taburl.htm?arg1=" + document.pagevar1 +
"&arg2=" + document.pagevar2
but that does not work. Is there a JavaScript method that would read the
values of page variables? or is there a Java method that would let me load
the top frame url?

Thank you for your help.

Nagui


Rahul Jain

unread,
Jan 31, 2003, 11:18:27 AM1/31/03
to
> Because a frameset does not accept page variables

Do you mean the page arguments? They sure work.

frameset.jsp?tabpgid=1&someOtherArgs=1
--> topFrame.jsp?tabpgid=1
--> bottomFrame.jsp?tabpgid=1&someOtherArgs=1

--
Rahul Jain

"Nagui Fam" <nf...@mgm.com> wrote in message
news:8EMSf2N...@forums.sybase.com...

Nagui Fam

unread,
Jan 31, 2003, 1:26:52 PM1/31/03
to
Thank you for your reply Rahul,
But that does not solve my problem yet. I would like to know is there a

JavaScript method that would read the
values of page arguments? For example let us say that I passed arg1 to a
page, in Java I can use request.getParameter(arg1) to read the value of
arg1. How can I do the same in JavaScript?

Also in JavaScript I can change the url of a frame from a script on another
frame. For example let us say in frame_1 I have the following script to
load a different page on frame_2
window.frame_2.location = newpage.htm
How can I do the same from Java.

Thank You

Nagui

"Rahul Jain" <rahul...@mail.com> wrote in message
news:Aj95IcU...@forums.sybase.com...

Tarik Makota

unread,
Jan 31, 2003, 6:54:46 PM1/31/03
to
You would have to obtain URL and then parse it for arguments!

var myURL = window.frame_2.location;

// now find args
var arg1start = myURL.indexof("arg1");
....

Tarik
Team Hepek
www.hepek.com


"Nagui Fam" <nf...@mgm.com> wrote in message

news:xyRiZhV...@forums.sybase.com...

Nagui Fam

unread,
Jan 31, 2003, 4:43:39 PM1/31/03
to
That would work if I am receiving a URL or the page is already loaded but I
am trying to load a new page and passing it the current page arguments. On
any case I discovered how to do it using both Java and JavaScript and here
is the syntax

Parent.frame_2.location =
newurl.jsp?arg1=<%=request.getparameter("arg1")%>&arg2==<%=request.getparame
ter("arg2")%>

Thank You all for your help

"Tarik Makota" <tma...@acedsl.com> wrote in message
news:zvKGF1W...@forums.sybase.com...

bi...@*nospam*.hotmail.com

unread,
Feb 3, 2003, 12:13:49 PM2/3/03
to
You can have your JSP define 'constants' in Javascript....

<Javascript tag>
myvar1 = <%=JSP_variable%> ;
</javascript tag>

You end up in the client with the myvar1 variable in Javascript loaded with
the value that you had in the JSP. It is not 'passing' but it does work for
JSP ==> client Javascript communication (one way obviously).

"Nagui Fam" <nf...@mgm.com> wrote in message

news:FIYhXPX...@forums.sybase.com...

0 new messages