Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

communication between frames and jsps

 
kesava chaitanya
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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=''>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic