Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   JavaScript and Client-Side Browser Scripting (http://www.programmingforums.org/forum23.html)
-   -   How to write new content to previously opened window? (http://www.programmingforums.org/showthread.php?t=7318)

aznluvsmc Nov 30th, 2005 9:37 PM

How to write new content to previously opened window?
 
Hi,

I have a form validation script that opens a child window and writes error messages to it. When the user tries to resubmit again and there are errors it should focus or re-open (if closed) and write the new error messages in the window. The problem I'm having is that when it writes the new messages, the old message is still in the window (even if the windows was closed). Does anyone know how I can clear the old message prior to writing the new one?

DaWei Nov 30th, 2005 10:24 PM

Not enough information. Are you writing the child window directly from the parent or are you opening a child window and filling it with a request to the server? If the former, are you clearing out the contents of any string you have been using to accumulate messages prior to opening the window? If the latter, have you considered the effects of caching? You may wish to explore information regarding closing a document and then reopening it and writing to it.

At any rate, any time you close a window, it is gone. Persistance is outside, somewhere, in a string or a file that is being saved or cached.

aznluvsmc Dec 1st, 2005 10:44 PM

You're right, the problem was that I wasn't clearing the string everytime I called the function. It's now resolved. Thanks.


All times are GMT -5. The time now is 3:45 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC