We have a nav bar in a top frame and a content frame - a button on the nav
bar has the following:-

<a href="#"
onClick="parent.content.location='http://127.0.0.1/website/servlet/ControlSe
rvlet?cmd=tocart&index=0';">

It goes off to the servlet which forwards the request to the appropriate
page which shows the shopping cart in the content frame.

I have already posted my problem which is to refresh two dynamic frames
(content supplied from the database) at the same time - one of which is the
calling frame - ie it has to refresh itself and another frame.

John.


----- Original Message -----
From: "Maria Baldassarri" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 29, 2000 6:17 PM
Subject: Re: jsp , buttons and frame


> >I assume your example is a simplistic representation of a more complex
> >problem that requires some JSP processing, not simply showing "button go
> >pressed".  If not, the JavaScript method is the most efficient way to do
> it.
>
> Of course, infact in my real problem what I want to display in the bottom
> frame the output of a bean method.
>
> >1. If you use the <FORM> tag in top frame, set the TARGET parameter to
the
> >bottom frame as follows:     <form action="foo.jsp" target="myBottom">
...
> ></form>
>
> I use a form that contain 3 buttons,
> Only if  one of the three  (let's say button1) has been pressed I need to
> do some
> server processing through foo.jsp.
> How can I do that?
>  thanks Maria
>
> Jorge Barrera <[EMAIL PROTECTED]> on 08/16/2000 06:19:19 PM
>
> Please respond to A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Maria Baldassarri/Tivoli Systems)
> Subject:  Re: jsp , buttons and frame
>
>
>
>
> I assume your example is a simplistic representation of a more complex
> problem that requires some JSP processing, not simply showing "button go
> pressed".  If not, the JavaScript method is the most efficient way to do
> it.
>
> Assuming you want to do some processing that requires JSP and show the
> results on the bottom frame, however, the way I would probably accomplish
> this is by posting your action from the top frame to the bottom frame URL.
>
> You can do this in at least 3 ways:
> 1. If you use the <FORM> tag in top frame, set the TARGET parameter to the
> bottom frame as follows:     <form action="foo.jsp" target="myBottom"> ...
> </form>
>
> 2. If you use <A HREF> tags for your buttons in top frame, set the TARGET
> parameter to the bottom frame (passing the clicked button in the query
> string) as follows:
>      <a href="foo.jsp?btn=[clickedbuttontext]"
> target="myBottom"><img="yourButton1.gif"></a>
>
> 3. If you want to use a JavaScript method, change the .URL or .location
> property of the bottom frame using JavaScript and the DOM as:
>      <SCRIPT>parent.myBottom.document.URL =
> "foo.jsp?btn=[clickedbuttontext]";</SCRIPT>
>
> Hope that helps some
>
> Jorge Barrera
> Coral Reef Technologies, Inc.
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Maria Baldassarri
> Sent: Tuesday, August 29, 2000 11:01 AM
> To: [EMAIL PROTECTED]
> Subject: jsp , buttons and frame
>
>
> I have a page with 2  frames whose names are "top" and "bottom".
> The top frame contain some input form and some buttons
> The bottom frame should contain the output of some processing that occur
on
> the server.
> I would like to relize this scenario using jsp.
> As first step I would like to write on the bottom frame which button of
the
> top frame has been pressed
>
> I've written some  code in the top.jsp like the following
>
> <br>The following button has been pressed:<br>
> <%
>      if(request.getParameter("reload.x")!=null){
>           out.println ("reload");
>      }
>      if(request.getParameter("start.x")!=null){
>           out.println ("start");
>      }
>      if(request.getParameter("stop.x")!=null){
>           out.println ("stop");
>      }
>      if(request.getParameter("go.x")!=null){
>           out.println ("go");
>      }
>
> %>
>
> This code shows which button has been pressed on the top frame
> what  do I have to write to show the same info on the button frame?
>
> I've tried to write some static text in the bottom frame with the
following
> code at the end of my top.jsp file, but with no success:
>
> <SCRIPT language="JavaScript">
> parent.bottom.document.write
> ("<HTML><HEAD><TITLE>Test</TITLE></HEAD><BODY>")
> ;
> parent.bottom.document.write("writing on  bottom frame");
> parent.bottom.document.write("</BODY></HTML>");
> </SCRIPT>
>
> If this code would work, I could combine the two above, and solve my
> problem!!
> what am I missing?
>
>
> thanks a lot Maria Baldassarri
>
>
> *************************************************************
>
> Maria Baldassarri
> Performance Area Development
>
> Rome Tivoli Laboratory
> Via Sciangai, 53
> 00144 - Rome (Italy)
> Tel.: +39 (06) 59662701
> E-Mail: [EMAIL PROTECTED]
> Fax: +39 (06) 59662456
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to