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

PostBack on Upload Issue.

4 Answers 87 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jay Leffue
Top achievements
Rank 1
Jay Leffue asked on 18 Oct 2010, 06:15 PM
I have a page with a link that opens a RadWindow on the page with an edit form.  When the user saves on the RadWindow the entire page reloads and updates info.  This was based on a Telerik example and worked fine.

I added a fileExplorer to the page now with a custom content provider.  Everything seemed to be working well.

However, my users have encountered an issue when they upload files.  I see that Upload is the only event on the FileExplorer that does a postback and not just an ajax load.  If the user uploads a file, and then uses the RadWindow edit form and saves their changes they will be prompted 100% of the time with the generic "Do you want to reload the page" browser dialog box and if they click cancel they will get Session has expired, if they click retry they will get the message from the FileExplorer stating that the file already exists.

It seems that the upload process from the FileExplorer is lingering in the page and when I tell my form to save it tries to save the file again since its locked up in the page refresh.

This seems to be because the edit form does a postback of its own information, and then using javascript closes itsself and reloads the underlying page, which still has the upload postback to fire. Its a simple window.location.reload()

Any suggestions as to a work around for this?

4 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 21 Oct 2010, 04:25 PM
Hello Jay,

You can use this approach in order to refresh the page without confirmation box:
function RefreshParentPageWithoutWarning()
{
   window.document.forms[0].submit();
}


All the best,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jay Leffue
Top achievements
Rank 1
answered on 21 Oct 2010, 06:28 PM
Implementing as such now yields the following error:

Error: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIDOMJSWindow.setTimeout]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: http://localhost:1583/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a7302be66-e7a1-4bc1-8280-71f03d66eba0%3a16e4e7cd%3af7645509%3a22a6274a%3a86526ba7%3a874f8ea2%3a24ee1bba%3a1e771326%3aaa288e2d%3ab7778d6c%3a8674cba1%3ac08e9f8a%3a59462f1%3aa51ee93e%3ae085fe68 :: anonymous :: line 6"  data: no]

It does not reload the parent page either.
0
Fiko
Telerik team
answered on 26 Oct 2010, 12:58 PM
Hello Jay,

I am not quite sure what is causing the  error on your side. Could you please rework the project attached to my replay, open a new support ticket and send it back? I will check it and do my best to provide a working solution as soon as possible.

All the best,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jay Leffue
Top achievements
Rank 1
answered on 26 Oct 2010, 06:42 PM
I see now, I was trying to call that from the window, not the parent.

All fixed now. Solution provided...Thank you.
Tags
FileExplorer
Asked by
Jay Leffue
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Jay Leffue
Top achievements
Rank 1
Share this question
or