This is a migrated thread and some comments may be shown as answers.

[Solved] clearing content in onClose event

2 Answers 100 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stacy
Top achievements
Rank 1
Stacy asked on 19 Apr 2012, 06:13 PM
When I put the following lines in my client side onClose event, the window does not close.

var window = $(this).data('tWindow');
window.content('');

The window variable is correct and has the proper value.
If I comment out the second line, the window closes. What i need to do is clear the content of the window when it is closed, so that the content is not appended to other forms that are active when the window is opened.

Thanks !

2 Answers, 1 is accepted

Sort by
0
Accepted
Pechka
Top achievements
Rank 1
answered on 20 Apr 2012, 08:20 AM
Try to put space instead of empty string content(" ")
0
Stacy
Top achievements
Rank 1
answered on 20 Apr 2012, 01:57 PM
Thanks, an a space makes it work! I also had just an empty <Span> element in prior to your reply and that worked as well, but I like just the space better.  Would be nice if there was just a simple clear() function associated with the window.content. 

Tags
Window
Asked by
Stacy
Top achievements
Rank 1
Answers by
Pechka
Top achievements
Rank 1
Stacy
Top achievements
Rank 1
Share this question
or