Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
Is there any way to alter the RedirectUrl after the control was initially rendered?
Rank: Member
Groups: Member
Joined: 9/21/2007(UTC) Posts: 12
|
I am using Image Uploader 4.7. I have the following question: Is there any way to alter the RedirectUrl after the control was initially rendered? We need to pass different query string depending on the different document type that is uploaded. I have the following code that is setting up “Action” and “RedirectURL” parameters. var uploadURL = path + "?Action=Upload" var redirectURL= path + "?Action=Result” //Configure URL files are uploaded to. iu.addParam("Action", uploadURL); //Configure URL where to redirect after upload. iu.addParam("RedirectUrl", redirectURL); My problem is, that when the control is rendered I do not know the additional information as Document Type that user is going to upload. There is a drop down box on the screen with the list of document types. A user selects the type of the document, selects the files and then uploads the files using your control. But at that moment I can not alter the query string since the control is already rendered. Any ideas, what I could do? Sincerely, smandros
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 9/19/2006(UTC) Posts: 491
Was thanked: 30 time(s) in 30 post(s)
|
Hello Smandros, You can change RedirectUrl property from BeforeUpload event handler or change window location from AfterUpload handler. I.e. something like this: Code:
function ImageUploader_AfterUpload(Page)
{
getImageUploader("ImageUploader").setRedirectUrl(_redirectPage);
window.location = _redirectPage;
}
function ImageUploader_BeforeUpload()
{
getImageUploader("ImageUploader").setRedirectUrl(_redirectPage);
}
var iu = new ImageUploaderWriter("ImageUploader", 800, 600);
// other properties
// These two handlers give completely the same result.
//iu.addEventListener("AfterUpload", "ImageUploader_AfterUpload");
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
iu.writeHtml();
|
Best regards, Eugene Kosmin The Aurigma Development Team
|
|
|
|
Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
Is there any way to alter the RedirectUrl after the control was initially rendered?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.