• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possible to have one frame submit another?

 
Bob Carpenter
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Struts 1.2. I have a two frame UI. The left frame is ControlsFrame for button controls (New, Save, Print,...), the right frame is the ViewerFrame with fields, dropdowns, etc.

Both frames have their own Forms and Actions - ViewerForm, ControlsForm, ViewerAction, ControlsAction.

I get the ViewerFrame populated with the data I want, then click the Print button and have a window popup showing the contents of the ViewerFrame minus all the dropdowns.

I want the ControlsFrame to somehow submit the ViewerFrame so that its form data is available for the Print window. I prefer not to have a "Submit" button in the ViewerFrame.

Any ideas how to solve?

Thanks,

BobC
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use JavaScript to submit a form in another frame. Something like this:

parent.viewFrame.document.forms[0].submit();

Where viewFrame is the name you gave the frame when you defined it. (<frame name="viewFrame">).
[ April 17, 2006: Message edited by: Merrill Higginson ]
 
Bob Carpenter
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Merrill,

Thanks for the info. This works great!

--BobC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic