GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes how to submit a form targeted to a frame in another jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to submit a form targeted to a frame in another jsp" Watch "how to submit a form targeted to a frame in another jsp" New topic
Author

how to submit a form targeted to a frame in another jsp

venkat cherukuri
Greenhorn

Joined: Mar 05, 2005
Posts: 5
i have a jsp called baseframe.jsp. In that i have a frameset, the frameset contains another frameset and a frame.

code as follows
---------------
<frameset cols="120,*" border="0">

<frameset rows="60,*" border="0">

<frame src="home.jsp" name="home" scrolling="no" noresize="noresize" frameborder="0" marginwidth="1" marginheight="1">
<frame src="menu.jsp" name="menu" scrolling="no" noresize="noresize" frameborder="0">

</frameset>
<frame src="blankFrame.jsp" name="application" scrolling="no" frameborder="0">

</frameset>


How do i submit one or more forms which is there in "blankframe.jsp" or anyother jsp which is dynamically targeted to the frame "application"...?

By clicking a link in menu.jsp i have to submit a form which is there in blankframe.jsp( ex i have a hyperlink called "submit"
in menu.jsp. I have to submit the form which is there in the blankframe.jsp or which ever jsp is dynamically targeted to the frame "applicaion" )
Chris Stehno
Ranch Hand

Joined: Feb 26, 2001
Posts: 180
If you are doing a form submission, try setting the target attribute of the form element to the name of the frame you want to send the response to.

If you want to have the response show up in "application" when submitting from a from in "menu":

<form ... target="application">

Though it sounds like you dont really need a form submit so much as a GET request in the other frame... if that is the case you can just use JavaScript in the menu to set the location of the application frame to whatever url you want.

Hope this helps.


- Chris Stehno, SCPJ
 
GeeCON Prague 2014
 
subject: how to submit a form targeted to a frame in another jsp