[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frame Refresh w/o removing Javascript



> Hi all,
>    I have a question about refreshing
> frame content. I have one frame containing
> Javascript, it's generated output and controls
> that allow configuration of settings which
> reside in HTTP Cookies. When a setting is
> changed, I would like to refresh the frame
> preferably, without hardcoding the page URL.
> My Refresh routine follows:
> 
> function redraw() {
>   parent.document.open();      Should Clear it
>   doContent();
> }

I don't think  .open() will clear an already open frame and I believe 
.clear() is broken (folks out there, correct me if I'm wrong).

>   The above works fine once, then fails. The
> first time it opens the document (clearing it)
> then replaces the content. Subsequently, it doesn't 
> clear the document and simple redraws the contenent
> below existing content.

If I understand correctly, the contents of the frame are generated 
by document.write() or the like? I had the same problem in a invoice 
creation routine.

Try:  parent.frame_name.location='javascript:';

John
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/