Well, this is one among many reasons frames are a pain. But if you use them, you must resign yourself to writing lots of javascript to manipulate the entire frame. You can't use HTTP headers to redirect, you have to serve up a page that uses window.location and window.replace (and .parent and whatever) to do the work.
If you want to manage and seperate content and navigation, I'd recommend using something like SidebarPage, which will abstract out the two on the server side, instead of frames which do so on the client side. You can make your own subclass that has your navigation, plus code that has to be used all around your site (like authentication). David Casti <[EMAIL PROTECTED]> wrote: > Hi, > > I've written some PSP code that I tack onto the start of every page to > verify that the user is authenticated to see the page. If there is any > problem with the authorization data, I use res.sendRedirect() to get them > back to the login page with a banner, useful error message, etc. > > Now, I've started to push some of these PSP pages into inline frames so I > can manage content and navigation more easily. This is causing a problem > because when res.sendRedirect() gets called from within an inline frame, > only the inline frame is updated with the login page... so the banner > appears mid-page, etc. > > If this was a regular <a href> tag in the inline form, I could use the > "target=_parent" instruction to refresh the whole page... not just the > inline frame. Since I'm doing a redirect instead, that process obviously > can't be used. > > I have a workaround... two different pieces of auth-checking code, pointing > to two different login pages (one for use by the inline frame, and one for > the main web page). Is there a more elegant way to solve this problem? > > Thanks, > David. > > ------------------------------------------------------------------ > David Casti Managing Partner > Neosynapse www.neosynapse.net > > > _______________________________________________ > Webware-discuss mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss > _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
