Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
sunbomb  
#1 Posted : Thursday, September 15, 2005 11:23:18 PM(UTC)
sunbomb

Rank: Member

Groups: Member
Joined: 9/15/2005(UTC)
Posts: 21

Hi,
I am using the trial version of Image Uploader for testing. I am using code as below with relevant parts showing. My situation is that after upload I need to show the result of the action page that processes the uploaded batch of files. That is why you see the function ImageUploader_Progress also being used below.

In IE this works fine. In Firefox 1.0.6, this crashes immediately after the page shows the server response. So everything looks fine for about a second, before Windows shows a program error and then throws Firefox out.

I haven't yet tested on the Mac OS.

Any suggestions?

Code:
<script language="javascript">
	function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
	    if (Status=="COMPLETE"){
		   document.clear();		   
		   document.write(StatusText);
		   document.close();
	    }
	}
</script>
<script language="javascript">
	var iu = new ImageUploaderWriter("ImageUploader", 600, 400);
	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.02.0";

	iu.addParam("Layout","TwoPanes");
	iu.addParam("FolderView", "List");
	iu.addParam("FileMask", "*.*");
	iu.addParam("MaxImageWidth","0");
	iu.addParam("MaxImageHeight","0");
	iu.addParam("MinImageWidth","0");
	iu.addParam("MinImageHeight","0");
	iu.addParam("ButtonSendText", "Upload");
	iu.addParam("CheckFilesBySelectAllButton", "true");
	iu.addParam("DeniedFileMask", "*.db;*.exe;*.asp;*.cfm;*.htm;*.log");
	iu.addParam("TreePaneWidth", "200");
	iu.addParam("BackgroundColor", "#5456");


	iu.addParam("ShowDebugWindow","True");
	iu.addParam("EnableRotate","False");
	iu.addParam("Action","upload.cfm");
	
	

	iu.addEventListener("Progress", "ImageUploader_Progress");

	iu.writeHtml();
</script>

Edited by user Sunday, February 17, 2008 1:53:37 PM(UTC)  | Reason: Not specified

sunbomb  
#2 Posted : Friday, September 16, 2005 12:14:45 AM(UTC)
sunbomb

Rank: Member

Groups: Member
Joined: 9/15/2005(UTC)
Posts: 21

Update to the above: Safari and Firefox on the Mac have not problems with the operation.
sunbomb  
#3 Posted : Friday, September 16, 2005 12:52:30 AM(UTC)
sunbomb

Rank: Member

Groups: Member
Joined: 9/15/2005(UTC)
Posts: 21

Never mind, I figured out what it was. I had another function in my code (that I had not listed) that added a field to the form before uploading. The eventListener for the method was added after the eventListener for checking for Progress.

Hence wrong way:
Code:
iu.addEventListener("Progress", "ImageUploader_Progress");
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");



Right way:
Code:
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
iu.addEventListener("Progress", "ImageUploader_Progress");


Apparently that confused Firefox on Windows and caused it to crash.

Edited by user Sunday, February 17, 2008 1:53:21 PM(UTC)  | Reason: Not specified

Fedor  
#4 Posted : Sunday, September 18, 2005 8:31:10 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
Quote:
sunbomb (9/16/2005)
Never mind, I figured out what it was. I had another function in my code (that I had not listed) that added a field to the form before uploading. The eventListener for the method was added after the eventListener for checking for Progress.

Hence wrong way:
Code:
iu.addEventListener("Progress", "ImageUploader_Progress");
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");



Right way:
Code:
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
iu.addEventListener("Progress", "ImageUploader_Progress");


Apparently that confused Firefox on Windows and caused it to crash.


Yes, it is very weird Firefox bug. I have no idea why it happens, but we will monitor this bug in further releases

Edited by user Sunday, February 17, 2008 1:53:07 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
sunbomb  
#5 Posted : Wednesday, September 28, 2005 2:39:15 AM(UTC)
sunbomb

Rank: Member

Groups: Member
Joined: 9/15/2005(UTC)
Posts: 21

Well,
Firefox on Windows definitely crashes consistently when there is a particular usage of the Java ImageUploader. I hae also noticed that about once in 30-40 times, IE on Windows also crashes. Please try this code.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Testing Aurigma ImageUploader</title>
	<script language="javascript" src="iuembed.js"></script>
</head>

<body>
<script language="javascript">
	function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText){
	    if (Status=="COMPLETE"){			
		   document.clear();
		   document.write("Done");
		   document.close();		 
	    }
	}
	function ImageUploader_BeforeUpload(){
		var uploader = getImageUploader("ImageUploader");
		//Do whatever code you want here
	}
</script>
<script language="javascript">
	var iu = new ImageUploaderWriter("ImageUploader", 600, 400);
	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.02.0";

	iu.addParam("Layout","TwoPanes");
	iu.addParam("FolderView", "List");
	iu.addParam("FileMask", "*.*");
	iu.addParam("MaxImageWidth","0");
	iu.addParam("MaxImageHeight","0");
	iu.addParam("MinImageWidth","0");
	iu.addParam("MinImageHeight","0");
	iu.addParam("ButtonSendText", "Upload");
	iu.addParam("CheckFilesBySelectAllButton", "true");
	iu.addParam("DeniedFileMask", "*.db;*.exe;*.asp;*.cfm;*.htm;*.log");
	iu.addParam("TreePaneWidth", "200");
	iu.addParam("BackgroundColor", "#5456");


	iu.addParam("ShowDebugWindow","True");
	iu.addParam("EnableRotate","False");
	iu.addParam("Action","upload.cfm")


	iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");
	iu.addEventListener("Progress", "ImageUploader_Progress");

	iu.writeHtml();
</script>

</body>
</html>



Your action page canbe anything, even an empty page. When the upload is complete, the Javascript should just clear the current document and write the word "Done" in the document. This happens, but after about a second or two, Firefox crashes. I have already been in touch with Alex Makhov of Aurigma about this. I am unsure whether this is a Firefox problem or a ImageUploader problem.

Edited by user Sunday, February 17, 2008 1:51:54 PM(UTC)  | Reason: Not specified

Alex Makhov  
#6 Posted : Friday, September 30, 2005 2:41:55 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

We have tried to reproduce the bug and the issue has really occurred. We are using LiveConnect to fire events so the reason of the problem is in LiveConnect. It doesn't allow to change current document while processing called JavaScript code.
Try to write to another document of redirect to another page instead of writing to current document directly.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Similar Topics
Firefox crashing on Mac when loading java applet (Image Uploader)
by stark77 2/26/2007 8:02:52 AM(UTC)
Firefox crashing (Discussions – ActiveX/Java Uploader)
by tom.leuntjens 2/6/2006 10:29:45 PM(UTC)
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.