You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Subhit <su...@quinnox.com> on 2003/04/29 15:51:36 UTC
to submit one jsp from other jsp
I am having a jsp page called xyz.jsp. Inside that jsp page i am having one
<html:form>
<html:form action="/checkConnection">
.
.
.
<html:form>
I am calling this jsp from other jsp abc.jsp using iFrame tag
<iframe ID='iFrameID' align='left' class='iFrameClass' frameborder=0
marginheight=0 marginwidth=0 name='iFrameName' src='/jsp/abc.jsp'
style='height:100%; width:100%'></iframe>
I am having a submit button in my abc.jsp.
<input type="submit" name="upload" value="upload" class="button"
onClick="return submitForm()">
By clicking this button i want to submit the form which is there in xyz.jsp.
I am using javascript to submit the form .
My JavaScript Code is
function submitForm()
{
window.document.frames["iFrameID"].document.checkConnectionForm.submit();
}
But when i am trying to submit the form by clicking the button its giving me
javascript error
checkConnectionForm is null or not an object...
Can any body help ?
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org
Re: to submit one jsp from other jsp
Posted by ha...@informatiefabriek.nl.
In your action declaration for your /checkConnection action (in
struts-config.xml), did you declare your form to be named:
checkConnectionForm?
something like this:
<action path="/checkConnection"
type="your.package.aType"
name="checkConnectionForm" <!-- this -->
scope="request"
input="/blah.jsp">
</action>
Cheers,
Harm de Laat
Informatiefabriek
"Subhit" <su...@quinnox.com>
04/29/2003 03:51 PM
Please respond to
"Struts Users Mailing List" <st...@jakarta.apache.org>
To
<st...@jakarta.apache.org>
cc
<st...@jakarta.apache.org>
Subject
to submit one jsp from other jsp
I am having a jsp page called xyz.jsp. Inside that jsp page i am having
one
<html:form>
<html:form action="/checkConnection">
.
.
.
<html:form>
I am calling this jsp from other jsp abc.jsp using iFrame tag
<iframe ID='iFrameID' align='left' class='iFrameClass'
frameborder=0
marginheight=0 marginwidth=0 name='iFrameName' src='/jsp/abc.jsp'
style='height:100%; width:100%'></iframe>
I am having a submit button in my abc.jsp.
<input type="submit" name="upload" value="upload"
class="button"
onClick="return submitForm()">
By clicking this button i want to submit the form which is there in
xyz.jsp.
I am using javascript to submit the form .
My JavaScript Code is
function submitForm()
{
window.document.frames["iFrameID"].document.checkConnectionForm.submit();
}
But when i am trying to submit the form by clicking the button its giving
me
javascript error
checkConnectionForm is null or not an object...
Can any body help ?
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org