Frames

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Antonie C Malan Snr

    Frames

    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.mainFram e.location.relo ad() and various other things
    like parent.mainFram e.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

  • Richard Cornford

    #2
    Re: Frames

    Antonie C Malan Snr wrote:[color=blue]
    > Dear All,
    >
    > The top frame contains a form with many select elements. ...[/color]
    <snip>[color=blue]
    > So, what I want to do is send the form contents ...[/color]
    <snip>[color=blue]
    > ... . The bottom frame then needs
    > to refresh and it will get the search data from the bean.[/color]
    <snip>[color=blue]
    > Any idea what the best way is?[/color]

    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.
    [color=blue]
    > I am better with Java and databases
    > than with JavaScript.[/color]

    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.


    Comment

    • Antonie Malan

      #3
      Re: Frames

      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

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...