| Author |
Iframe and Struts
|
Stefano Danieli
Greenhorn
Joined: Jul 05, 2007
Posts: 3
|
|
Hi. I've developed a simple example that represent my problem. I've got a main.jsp page that contains 2 HTML IFRAME : each iframe contains iframe1.jsp and iframe2.jsp <body> <iframe border="0" frameborder="no" framespacing="0" src="jsp/iframe1.jsp" width="30%" height="100%"> </iframe> <iframe src="jsp/iframe2.jsp" border="0" frameborder="no" framespacing="0" width="70%" height="100%"> </iframe> </body> this is html for iframe2.jsp : <body> <html:form action="/myAction"> <html:text property="name"></html:text> <html:text property="surname"></html:text> <html:submit/> </html:form> </body> I've got also a struts action that is mapped in this way : <action attribute="myBean" input="/jsp/iframe2.jsp" name="userFormBean" path="/myAction" scope="request" type="it.stefano.action.myAction"> <forward name="index" path="/jsp/iframe3.jsp" /> </action> This action simply change iframe2.jsp to another jsp iframe3.jsp by redirect. My problem is how i can call myAction from iFrame1.jsp and redirect the result in the second IFrame. (e.g : viewing the change from iframe2.jsp to iframe3.jsp). [ July 05, 2007: Message edited by: Stefano Danieli ]
|
 |
Amit M Tank
Ranch Hand
Joined: Mar 28, 2004
Posts: 257
|
|
|
Invoke the action from the Iframe instead of the JSP.
|
Amit Tank
Linked In
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
I'm not sure I understand entirely what you're after, but this may help: If you add a name attribute to your iframes, you can then use the target attribute of an <html:form> to redirect the response from one iframe to the other.
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: Iframe and Struts
|
|
|