Hi,
I believe that what you are asking for cannot be done by the server.
This is because the server cannot push anything without the browser
requesting it.
It is the browser's decisions to output the data (html page, ...) in a
particular frame (the server has no control over this).
You usually use the "target" attribute in an <a href="" >..</a> tag to
accomplish this.
There is also a target property that can be found in the form object
using client side javascript.
example:
<html>
<head>
<script language="Javascript">
<!--
function redirectToFrame(form) {
// This will cause all feed back from the server to be sent to the frame
// specified by the target property.
form.target="mainFrame"; // Specify the window or frame name
form.submit();
}
// -->
</script>
</head>
<body>
<html:form>
<html:submit ... onclick="redirectToFrame(this.form);"/>
</html:form>
</body>
</html>
I'm giving you this information from the top of my head so you may need to
tweak this a little.
Note: After the submit operation the target remains the same (that is
"mainFrame") so you must find a way to set it back to the original target
after you have retrieved the data you submitted for.
There may be other alternatives that I am not aware of.
Pawel
-----Message d'origine-----
De : James Howe [mailto:[EMAIL PROTECTED]]
Envoye : mercredi 16 mai 2001 13:19
A : [EMAIL PROTECTED]
Objet : Forwarding to a specific target frame
Is there a way to get a struts action to forward to a particular target
frame? I have a page which contains two internal frames (iframes). One of
the internal frames contains a form. When this form is submitted or
cancelled, I want to display a different page in my main frame. What is
currently happening, is that my forward ends up putting the forwarded page
my iframe. I have a feeling that I'm somehow going to have to restructure
my page, but that will be really inconvenient to do. If there is anyway to
get a forward to go to a particular frame target, I would love to hear how
to do it.
Thanks.