CGInitiate has asked for the wisdom of the Perl Monks concerning the following question:

i have been developing a script (on my win '98 OS) designed to read the data from a form and append it to a text file to serve as the basis for a simple chat program. All is well here.

i have the HTML page set to display 3 frames:
1) The form (of course).
2) The display.
3) A navigational element.

Problem: How can i get the display frame to refresh when the form is submitted from the other frame? Using meta tags works, but is a rather clumsy approach. Any suggestions greatly appreciated.

Problem 1a: Is there also a way to make sure the frame is refreshed for *each* user every time an entry is added to the text file?

Thanks and God bless.
-'i'nitiate

Originally posted as a Categorized Question.

  • Comment on Refreshing a frame with script called from different frame

Replies are listed 'Best First'.
Re: Refreshing a frame with script called from different frame
by dreadpiratepeter (Priest) on Feb 03, 2002 at 02:49 UTC
    You can use a bit of javascript to do it. If you want to do it right when the form is submitted you can write an onSubmit handler for the form. i.e.:
    onSubmit="top.document.displayframe.document.location.href='url';retur +n true;"

    (In IE, the syntax is a little different in NN).
    Or to have the frame refreshed when the form destination is loaded add an onLoad event to the BODY tag of the destination document, similar to the above.

    -pete
    Entropy is not what it used to be.

    Originally posted as a Categorized Answer.