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

[Solved] Close window after file upload/refresh parent

1 Answer 193 Views
Window
This is a migrated thread and some comments may be shown as answers.
Philip Senechal
Top achievements
Rank 1
Philip Senechal asked on 25 Apr 2008, 04:08 PM
I need a little help here...I think this is possible, I just can't figure out how to do it.

I have a page with RadTabStrip control on it. On one of the tabs is a "group photo". I have a link on the page which pops a RadWindow to handle the upload of a single file using RadUpload. What I need to happen when someone clicks the Submit button, is that the file uploads, the RadWindow closes, and the page with the RadTabStrip refreshes.

I tried implementing the code example posted on this site where you inject the javascript to a label to close the page, but since RadUpload does a postback, I think it's bypassing my injection. I tried putting the injection script in the Page Load event and calling it with If Page.IsPostBack, but that didn't work either.

Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 29 Apr 2008, 08:45 AM
Hello Philip,

I am not quite sure about your setup, but I would suggest to check the following KB:
http://www.telerik.com/support/kb/article/b454K-gtd-b454T-cec-b454c-cec.aspx

It shows how to call Javascript code from the server in several scenarios (the KB is about radalert, but the logic is the same). My suggestion is to hook to the onclick event of the submit button and to call the desired code there - the server onclick event will be fired after the upload has finished.




Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Philip Senechal
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or