• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

communication between frames and jsps  RSS feed

 
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 ?
 
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
 
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
 
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=''>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!