File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes communication between frames and jsps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "communication between frames and jsps" Watch "communication between frames and jsps" New topic
Author

communication between frames and jsps

kesava chaitanya
Greenhorn

Joined: Aug 20, 2001
Posts: 28
hi...
i am using Frameset.within the frameset i have defined 2 frames
1.one frame is for toolbar.jsp
2.second frame is for interface screen.
in the toolbar.jsp having 8 to 10 buttons are there..(like save,modify,delete,first,next,last,previous,etc...)
if i entered some thing in the interface screen components..but i want to save these detials into tables...
for this purpose i am clicking the save button in the toolbar.jsp page..
my question is?
i want to get the values from the jsp page ,for this purpose what i have to do?
and also how to communicate these two pages ?
Veena Rani
Ranch Hand

Joined: Mar 09, 2000
Posts: 34
On click of save button in the upper frame you can submit the forms in the lower frame , that way you can get the value in the interface screen after submitting.
Before submiiting for getting the values stored the top frame in the lower frame you can use
top.frames[0].document.forms[0].formElement.value
vice versa will also work
Veena
rc rao
Greenhorn

Joined: Oct 03, 2002
Posts: 1
Thank q very much for giving a reply....
but i want different thing..
1.Toolbar.jsp is common for all the screens.
2.in this case where i have to submit the form..
3.what about form names in the toolbar and screens..

bye,ramu
John Horton
Greenhorn

Joined: Jan 15, 2002
Posts: 3
You'll have to use JavaScript. Have the toolbar frame call a javascript method in the body frame to perform the function. The body frame can then submit a page form to update your tables.
Toolbar.jsp
function onSaveBtn() {
parent.bodyFrm.onSaveBtn();
}
in Body.jsp
function onSaveBtn() {
document.theForm.operation.value = 'save';
document.theForm.submit();
}
<form name='theForm' method='POST'>
<input type='hidden' name='operation' value=''>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: communication between frames and jsps