This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Question with frames in struts/JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Question with frames in struts/JSP" Watch "Question with frames in struts/JSP" New topic
Author

Question with frames in struts/JSP

Radha Damera
Ranch Hand

Joined: Oct 31, 2000
Posts: 35
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

Joined: Sep 21, 2003
Posts: 415
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 ............
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Question with frames in struts/JSP
 
Similar Threads
Form Html to Frames JSP
Display a pdf in another jsp
Controlling the display of JSP pages
reloading the frame
Frameset Refresh Problem