PDA

View Full Version : frames question



Dan Walsh
11-Aug-2005, 04:43 PM
A WebApp I'm working on uses frames ... yea, yea, I know.

I'd like for the column 1 content page to refresh when I do a redirect
in column 2, the main area.

Any thoughts?

TIA,

Dan

Knut Sparhell
11-Aug-2005, 10:12 PM
Dan Walsh wrote:
> A WebApp I'm working on uses frames ... yea, yea, I know.

:-)

> I'd like for the column 1 content page to refresh when I do a redirect
> in column 2, the main area.
>
> Any thoughts?

It can't be done *when* you redirect (HTTP redirect, as ASP
Response.Redirect), because a refresh must be invoked form the client
and a redirect must be done *before* any HTML headers/content are responsed.

But you can do it immediately *after* the redirect has taken place, with
a script inside the new page. You will probably want some conditions on
this, determined in the URL the user was redirected from. Then add a
query to the redirect URL, like ?refresh-frame=left or just ?refresh

For a script to be allowed have effect on another frame, the two frames
URL must be from the same domain.

--------------------------
About frames:

Frames are not always just a "no-no". In some cases they are very
useful, like when:

1. You have to combine two already made and working pages into one
window. Other userss may need the individual pages.

2. The application discourages all kinds of caching, and a part of the
window (a frame) is heavily loaded with images. Keeping it framed might
speed it up.

3. You must build your pages, using common elements like menues, without
a server scripting or SSI environment available, just plain html and
client scripting.

--
Knut Sparhell, Norway

Dan Walsh
13-Aug-2005, 07:59 AM
Thanks Knut.

Knut Sparhell wrote:
> Dan Walsh wrote:
>
>> A WebApp I'm working on uses frames ... yea, yea, I know.
>
>
> :-)
>
>> I'd like for the column 1 content page to refresh when I do a redirect
>> in column 2, the main area.
>>
>> Any thoughts?
>
>
> It can't be done *when* you redirect (HTTP redirect, as ASP
> Response.Redirect), because a refresh must be invoked form the client
> and a redirect must be done *before* any HTML headers/content are
> responsed.
>
> But you can do it immediately *after* the redirect has taken place, with
> a script inside the new page. You will probably want some conditions on
> this, determined in the URL the user was redirected from. Then add a
> query to the redirect URL, like ?refresh-frame=left or just ?refresh
>
> For a script to be allowed have effect on another frame, the two frames
> URL must be from the same domain.
>
> --------------------------
> About frames:
>
> Frames are not always just a "no-no". In some cases they are very
> useful, like when:
>
> 1. You have to combine two already made and working pages into one
> window. Other userss may need the individual pages.
>
> 2. The application discourages all kinds of caching, and a part of the
> window (a frame) is heavily loaded with images. Keeping it framed might
> speed it up.
>
> 3. You must build your pages, using common elements like menues, without
> a server scripting or SSI environment available, just plain html and
> client scripting.
>