Rank: Newbie
Groups: Member
Joined: 11/5/2008(UTC) Posts: 4
|
I recently tried out the ActiveX version of ImageUploader under IE8, XP SP3, Uploader version 6.1.4.0
IUEmbed Warning: Function "PhotoUpload_afterUpload" passed to addEventListener method has a wrong number of parameters. For AfterUpload event it should have function(Html) signature.
Now, I have the PhotoUpload_afterUpload = function(Html){...} declared prior to calling ImageUploader instantiation.
I'm puzzled as to why it keeps popping up. This problem doesn't exists in the Java version of 6.1.4.0.
Does anyone seen this problem before?
Once I get pass the warning dialog box, the uploader loads fine it seems.
thanx.
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hello,
Could you please post your code here.
|
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 11/5/2008(UTC) Posts: 4
|
init() is called when we need to upload pictures to the server.
var init = function() { //Create JavaScript object that will embed Image Uploader to the page. var iu = this.iu = new ImageUploaderWriter(this.name, 800, 500);
if (Ext.isIE == true) { // Configure installation //var ip = this.ip = new InstallationProgressExtender(iu); //ip.setProgressHtml("Loading Picture Uploader ..."); //ip.setProgressImageUrl(); //ip.setCommonHtml(); //ip.setBeforeIE6XPSP2ProgressHtml(); //ip.setIE6XPSP2ProgressHtml(); //ip.setIE7ProgressHtml(); //ip.setIE8ProgressHtml(); //ip.setProgressCssClass();
iu.activeXControlEnabled = true; //For ActiveX control full path to CAB file (including file name) should be specified. iu.activeXControlCodeBase = "../../js/Aurigma/ImageUploader6.1/ImageUploader6.cab"; iu.activeXControlVersion = "6,1,4,0"; iu.javaAppletEnabled = false; } else { //For Java applet only path to directory with JAR files should be specified (without file name). iu.javaAppletJarFileName = "ImageUploader6.jar"; iu.javaAppletCodeBase = "../../js/Aurigma/ImageUploader6.1/"; iu.javaAppletCached = true; iu.javaAppletVersion = "6.1.4.0"; iu.activeXControlEnabled = false; }
iu.addParam("ShowDebugWindow", "true"); iu.addParam("SilentMode", "false");
iu.fullPageLoadListenerName="_PictureUpload_initComplete_"; iu.addEventListener("BeforeUpload", "PhotoUpload_beforeUpload"); iu.addEventListener("AfterUpload", "PhotoUpload_afterUpload"); // iu.addEventListener("InitComplete", "_PictureUpload_initComplete_"); // ...the user goes to another folder iu.addEventListener("FolderChange", "photoUpload_setStatusText"); // ...the number of items selected for upload is chaned iu.addEventListener("UploadFileCountChange", "photoUpload_setStatusText");
...
}
On a separate file, loaded during page initialization ...
var PhotoUpload_beforeUpload = function() { ... }
var PhotoUpload_afterUpload = function(html) { window.location.reload(); }
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, I looked through your code and found syntax errors. You should correct your code as follows: Code:iu.addEventListener("BeforeUpload", "PhotoUpload_beforeUpload");
iu.addEventListener("AfterUpload", "PhotoUpload_afterUpload");
...
function PhotoUpload_beforeUpload()
{
....
}
function PhotoUpload_afterUpload(Html)
{
window.location.reload();
}
|
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 11/5/2008(UTC) Posts: 4
|
Thanks!
Looks like Aurigma is looking for a very specific signature. I tried your solution and it seems to work.
Cheers.
|
|
|
|
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.