Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 30th, 2005, 9:37 PM   #1
aznluvsmc
Hobbyist Programmer
 
Join Date: Aug 2005
Posts: 137
Rep Power: 3 aznluvsmc is on a distinguished road
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?
aznluvsmc is offline   Reply With Quote
Old Nov 30th, 2005, 10:24 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Dec 1st, 2005, 10:44 PM   #3
aznluvsmc
Hobbyist Programmer
 
Join Date: Aug 2005
Posts: 137
Rep Power: 3 aznluvsmc is on a distinguished road
You're right, the problem was that I wasn't clearing the string everytime I called the function. It's now resolved. Thanks.
aznluvsmc is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:28 PM.

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