Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
venkat cherukuri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic