![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Aug 2005
Posts: 137
Rep Power: 4
![]() |
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? |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Aug 2005
Posts: 137
Rep Power: 4
![]() |
You're right, the problem was that I wasn't clearing the string everytime I called the function. It's now resolved. Thanks.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|