|
|
Rank: Member Groups: Member
Joined: 2/13/2006 Posts: 5 Points: 0
|
I want to use the addfield property with the java applet. If i add the following line the page is not executed properly and i get a blank screen. Code:getImageUploader("ImageUploader1").AddField("field", "value"); It works fine for the activeX version. How can i solve this?/What am i doing wrong?
|
|
 Rank: Advanced Member Groups: Member
Joined: 8/3/2003 Posts: 996 Points: 1
|
Hello,
When do you call this code (on some button click or ImageUploader event)?
Sincerely yours, Alex Makhov
|
|
Rank: Member Groups: Member
Joined: 2/13/2006 Posts: 5 Points: 0
|
Right after writing the html for the applet: Code:var iu = new ImageUploaderWriter("ImageUploader1", 770, 500); iu.activeXControlEnabled = false; iu.javaAppletEnabled = true;
//For Java applet we specify only directory with JAR files iu.javaAppletCodeBase = "../../../"; iu.javaAppletCached = true; iu.javaAppletVersion = "1.1.70.0"; iu.addParam("Layout","TwoPanes"); iu.addParam("UploadThumbnail1FitMode","off"); iu.addParam("UploadThumbnail1Width","120"); iu.addParam("UploadThumbnail1Height","120"); iu.addParam("UploadThumbnail1JpegQuality","60"); iu.addParam("ShowDebugWindow","False"); iu.addParam("EnableRotate","False"); iu.addParam("Action","DocumentUploadProcess.aspx"); iu.addParam("MaxTotalFileSize", "10240000"); iu.addParam("UploadMode", "Separate"); iu.addParam("TimeOut", "12000000"); iu.addEventListener("Progress", "ImageUploader_Progress"); iu.writeHtml(); getImageUploader("ImageUploader1").AddField("FileLocation", "ParticipantUser");
|
|
 Rank: Advanced Member Groups: Member
Joined: 8/3/2003 Posts: 996 Points: 1
|
Hello, You have to use fullPageLoad or beforeUpload event handler which is called after Image Uploader initialization. Change your code to the following: Code:iu.addParam("TimeOut", "12000000"); iu.addEventListener("Progress", "ImageUploader_Progress"); iu.fullPageLoadListenerName = "fullPageLoad"; iu.writeHtml();
And add fullPageLoad handler: Code:function fullPageLoad() { getImageUploader("ImageUploader1").AddField("FileLocation", "ParticipantUser"); }
Sincerely yours, Alex Makhov
|
|
Rank: Member Groups: Member
Joined: 2/13/2006 Posts: 5 Points: 0
|
Ok, thanx. It does work now :).
Maybe you want to put this example in the helpfile cos i would never come to this solution reading the helpfile.
|
|
 Rank: Advanced Member Groups: Member
Joined: 8/3/2003 Posts: 996 Points: 1
|
Hello, Quote:Maybe you want to put this example in the helpfile cos i would never come to this solution reading the helpfile. OK, we will make the changes.
Sincerely yours, Alex Makhov
|
|
|
Guest |