Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form not submitting..

Status
Not open for further replies.

patnim17

Programmer
Jun 19, 2005
111
US
Hi,
I have main JSP page, Main.jsp. I have a IFrame inside this page that I use as a popup. So when a button is clicked in the Main.jsp page I show this Iframe and set the SRC of this IFrame to Sub.jsp.
In Sub.jsp I have a Form that needs to be submitted. So I have a Form (name="myForm") method=post. Now what should the Target of the Form be set to so that the response for the server comes to the main Window that contains the Main.jsp...is it "_parent"?

patnim
 
Hi,

The form target in the Sub.jsp should be _top ie., target="_top"

Cheers
Venu
 
Thanks..but looks like I have a little differenet problem.
My Form itself is not submiting. I am using WebLogic Server.
And the way I submit the form is using javascript in Sub.jsp (IFrame)like this:

function submitForm(){
var sForm;
sForm = document.forms['AddForm'];
alert("Submiting form " + sForm.name);
sForm.submit();
return true;
}

and my form and the button looks like this in the body:
<form name="AddForm" target="_top" method="post">
input type="button" name="OK" value="OK" class="buttons" onclick="submitForm()"></input>
</form>
 
Hi,

Which action does it needs to call. If you are using IFrame then the directory structure will one level down.

Cheers
Venu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top