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

Notification

Icon
Error

Options
Go to last post Go to first unread
codesmith  
#1 Posted : Wednesday, March 28, 2007 4:40:39 AM(UTC)
codesmith

Rank: Advanced Member

Groups: Member
Joined: 7/8/2005(UTC)
Posts: 40

Hi, Using Uploader 4.1 Dual Having 2 problems with Firefox browsers: 1) Most urgent - redirecturl is not working on a PC (Windows XP SP2, Firefox 2.0.0.2) - upload finishes, click OK, and nothing happens. 2) On a Mac (OSX 10.4, Firefox 1.5.0.4) -- we've implemented the Javascript methods to update a counter with the number of files uploaded and total size of files. This works everywhere except this browser/platform combo. Javascript cut and pasted from Firefox on PC shown below. Any help appreciated!!
Code:
<script src="../newiu/iuembed.js" type="text/javascript" language="JavaScript"></script>
<script type="text/javascript" language="JavaScript">

var agt=navigator.userAgent.toLowerCase(); 
var is_ie   = (agt.indexOf("msie") != -1); 

var ImageUploader = null;

function formatFileSize(value){
	if (value < 1024){
		return value + " b";
	}
	else if (value < 1048576){
		return Math.round(value / 1024) + " kb";
	}
	else{
		return Math.round(value / 10485.76) / 100 + " mb";
	}
}

function fullPageLoad(){	
	ImageUploader=getImageUploader("ImageUploader");
	document.getElementById("spanMaxFileCount").innerHTML = ImageUploader.getMaxFileCount();
	document.getElementById("spanMaxTotalFileSize").innerHTML = formatFileSize(parseInt(ImageUploader.getMaxTotalFileSize()));
}

function ImageUploader_UploadFileCountChange(){
	if (ImageUploader){	
		document.getElementById("spanUploadFileCount").innerHTML = parseInt(ImageUploader.getUploadFileCount());
		var imgWidth = parseInt(ImageUploader.getUploadFileCount()) / parseInt(ImageUploader.getMaxFileCount()) * 132;	
		document.getElementById("imgUploadFileCount").style.width = Math.round(imgWidth) + "px";

		document.getElementById("spanTotalFileSize").innerHTML = formatFileSize(parseInt(ImageUploader.getTotalFileSize()));
		imgWidth = parseInt(ImageUploader.getTotalFileSize()) / parseInt(ImageUploader.getMaxTotalFileSize()) * 132;
		document.getElementById("imgTotalFileSize").style.width = Math.round(imgWidth) + "px";
	}
}

function ImageUploader_ViewChange(){
	if (ImageUploader){
		document.getElementById("selectView").selectedIndex = parseInt(ImageUploader.getFolderView());
	}
}

function selectView_change(){
	if (ImageUploader){
		var selectView = document.getElementById("selectView");
		ImageUploader.setFolderView(parseInt(selectView.options[selectView.selectedIndex].value));
	}
}


//	var iu = new ImageUploaderWriter("ImageUploader", 721, 400);
	var iu = new ImageUploaderWriter("ImageUploader", 571, 400);
	
	//For ActiveX control we specify full path for CAB file
	iu.activeXControlCodeBase = "../newiu/ImageUploader4.cab";
	iu.activeXControlVersion = "4,1,1,0";
	
	//For Java applet we specify only directory with JAR files
	iu.javaAppletCodeBase = "../newiu/";
	iu.javaAppletCached = true;
	iu.javaAppletVersion = "2.1.1.0";
	
	iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.tif;*.tiff;*.tga;*.pcx;*.bmp;*.psd;*.png;*.zip");
	iu.addParam("ShowDescriptions", "false");

	iu.addParam("LicenseKey","<<license code not shown>>");
	iu.addParam("SignatureFilter","All");
	iu.addParam("ShowDebugWindow","False");
	iu.addParam("Action","order_util_act.php")
	iu.addParam("RedirectUrl","order2_new.php")
	iu.addParam("ShowButtons", "True");
	iu.addEventListener("Progress", "ImageUploader_Progress");
	iu.addParam("AutoRecoverTimeOut", "10000");
	iu.addParam("AutoRecoverMaxTriesCount", "3");

	iu.addParam("TreePaneWidth", "150");
	iu.addParam("FolderPaneHeight", "200");
	
	//Add event handlers.
	iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
	iu.addEventListener("ViewChange", "ImageUploader_ViewChange");
	iu.fullPageLoadListenerName = "fullPageLoad";
	iu.addParam("MaxTotalFileSize", "104857600");
	iu.addParam("MaxFileCount", "60");
	iu.addParam("MaxFileSize", "8388608");
</script>

Edited by user Friday, February 22, 2008 2:00:04 PM(UTC)  | Reason: Not specified

codesmith  
#2 Posted : Thursday, March 29, 2007 9:43:43 AM(UTC)
codesmith

Rank: Advanced Member

Groups: Member
Joined: 7/8/2005(UTC)
Posts: 40

Hi Folks, Really need to get #1 above fixed.... right now people can't use Firefox on the site - bad news. If any more info would help please let me know. Thanks, Justin
Alex Makhov  
#3 Posted : Thursday, March 29, 2007 4:58:07 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello Justin, One of our clients had the same problem several days ago. He have fixed this problem by moving AdditionalForm lower than Image Uploader on the page. There is no logic but it helped. Try to comment some elements on your page, try to move them to another place.
Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
George Ulyanov  
#4 Posted : Thursday, March 29, 2007 5:34:34 PM(UTC)
George Ulyanov

Rank: Advanced Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 203

Hi, Also please check your code. I have found that you have ImageUploader_Progress event handler which you have not implemented in your code:
Code:
iu.addEventListener("Progress", "ImageUploader_Progress");

Edited by user Friday, February 22, 2008 2:03:49 PM(UTC)  | Reason: Not specified

Best regards, George Ulyanov
codesmith  
#5 Posted : Monday, April 02, 2007 2:26:49 AM(UTC)
codesmith

Rank: Advanced Member

Groups: Member
Joined: 7/8/2005(UTC)
Posts: 40

Hi Alex and George, Thanks for your replies. Alex - not sure what you mean - I did a search on "AdditionalForm" and no hits so I don't think we're using that. George - thanks for pointing out the Javascript problems. That fixed my problem #1 where users weren't being redirected to the next page after uploading. My problem #2 still exists - Firefox/OSX users don't see an updated counter when they add photos. Thanks again, Justin
Users browsing this topic
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.