Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question with frames in struts/JSP

 
Radha Damera
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI...

I have a question regarding JSP & struts. In the index page, I have 3 frames - a top frame, a left frame and a
center frame. And right from index page, based on the user actions, we keep displaying new JSPs in the center frame,thus
keeping the top & left frames constant.

My requirement is that for a certain page, i shouldn't display the left frame.so the index page should have only 2 frames - top
& a 100% center frame.I tried to put an if condition saying that the left frame shld be invisible, but the problem is
that the request is not coming back to index page and the code is getting executed only when index page loads up initially. iam assuming this is the case b'se of struts - we keep fowarding the request from one page to the other and not back.

Is there a way around?should i load index page again completely?or how shld i proceed so that my if condition gets executed and only 2 frames show up.

Hope Iam clear

Thanks
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi radha

Its not the problem with struts...thats the way frames behave ..........when u click on the left frame only right frame refreshes ....so the index page wont be reloaded again thus ur part of code wont execute ....but u can achieve using javascript ......u can hide the left frame too by using JS but u should know when to hide and all mean u should have some parameter to decide up on ............
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic