Frames

  • Thread starter Antonie C Malan Snr
  • Start date
A

Antonie C Malan Snr

Dear All,

The top frame contains a form with many select elements. They are used
to do database searches. As the selects are based on data in the
database which is loaded onLoad (the top page is a JSP) I do not want to
load the page in the top frame again after the initial load.

The page in the bottom frame is also a JSP and reads a the search
results from a bean when it loads.

So, what I want to do is send the form contents from the top page to the
servlet, the servlet then gets it via a few other classes from the
database and it is loaded into the bean. The bottom frame then needs to
refresh and it will get the search data from the bean.

I've tried parent.mainFrame.location.reload() and various other things
like parent.mainFrame.open("results.jsp", "mainFrame", "") etc. No luck.

Any idea what the best way is? I am better with Java and databases than
with JavaScript.

Thanks,

Chris
 
R

Richard Cornford

Antonie said:
Dear All,

The top frame contains a form with many select elements. ...
So, what I want to do is send the form contents ...
... . The bottom frame then needs
to refresh and it will get the search data from the bean.
Any idea what the best way is?

Pure HTML. Give the form in the top frame a TARGET attribute that names
the bottom frame and an ACTION attribute the refers to the JSP being
displayed in the bottom frame and when the form is submitted the
response will be sent to the (named) bottom frame, effectively
refreshing its contents. You just have to make sure that the JSP for the
bottom frame is set up to load the submitted information into the bean
and that doing so updates the bean's state with the search results via
the database.
I am better with Java and databases
than with JavaScript.

Whenever something can be achieved with HTML and server-side scripting
alone it is best to question the need to involve client-side scripting
at all.

Richard.
 
A

Antonie Malan

Hi Richard,

Thanks for that. I'm now going to try it. What will happen to the
contents of the top frame that I want to preserve, if at all possible?

Chris Malan
 

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,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top