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

Notification

Icon
Error

Options
Go to last post Go to first unread
StefanBerger  
#1 Posted : Wednesday, July 26, 2006 9:40:26 PM(UTC)
StefanBerger

Rank: Member

Groups: Member
Joined: 7/25/2006(UTC)
Posts: 5

Hello again, I have installed the image uploader java, and everthing works fine in ie and firefox, but in opera 9. In my ImageUploader Javascript i have a lot of iu.addParam statements, because i need to change the language and customize some things. If i have too much of such statements, opera does not load fullPageLoad. But if i remove one addparam statement, its not important which one, opera works and loads fullPageLoad. In the "iuembed.js" i saw that addparam adds an element to an array, could it be possible that opera has an javascript memory leak? Or is it a bug of the imageuploader? Opera 9 java version 2.0.35.0 Thanks, Stefan my imageuploader initialization:
Code:
			<script src="lib/imageuploader/iuembed.js"></script>

			<script type="text/javascript">


var imageUploader1 = 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(){	
	imageUploader1=getImageUploader("ImageUploader1");
	document.getElementById("spanMaxFileCount").innerHTML = imageUploader1.getMaxFileCount();
				
				document.getElementById("photo_waiter").style.display="none";
				document.getElementById("photo_header").style.display="block";
				document.getElementById("photo_waiter_box").style.display="none";
				
				//document.getElementById("photo_uploader").style.visibility="visible";
				
				document.getElementById("photo_view").style.display="block";
}

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

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

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

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




</script>

<script type="text/javascript">
			var iu = new ImageUploaderWriter("ImageUploader1", 610, 400);


			//GERMAN TRANSLATION
			iu.addParam("ButtonAddAllToUploadListText", "Alle hinzufügen");
			iu.addParam("ButtonAddFilesText", "Dateien hinzufügen...");
			iu.addParam("ButtonAddFoldersText", "Verzeichnisse hinzufügen...");
			iu.addParam("ButtonAddToUploadListText", "Hinzufügen");
			iu.addParam("ButtonDeleteFilesText", "");
//			iu.addParam("ButtonDeselectAllText", "Auswahl aufheben");
			iu.addParam("ButtonPasteText", "Einfügen");
			iu.addParam("ButtonRemoveAllFromUploadListText", "Alle entfernen");
//			iu.addParam("ButtonRemoveFromUploadListText", "Entfernen");
			iu.addParam("ButtonSelectAllText", "Alles auswählen");
//			iu.addParam("ButtonSendText", "Hochladen");
			iu.addParam("ButtonStopText", "");
			iu.addParam("DescriptionEditorButtonCancelText", "Abbrechen");
			iu.addParam("DescriptionEditorButtonOkText", "OK");
			iu.addParam("DimensionsAreTooLargeText", "Die Abmessungen sind zu groß");
			iu.addParam("DimensionsAreTooSmallText", "Die Abmessungen sind zu klein");
//			iu.addParam("DropFilesHereText", "Fotos hier ablegen");
			iu.addParam("EditDescriptionText", "Titel angeben...");
			iu.addParam("FileIsTooLargeText", "Datei zu groß");
			iu.addParam("HoursText", "Stunden");
			iu.addParam("IncludeSubfoldersText", "Unterverzeichnisse einbeziehen");
			iu.addParam("KilobytesText", "Kilobytes");
			iu.addParam("ListColumnFileNameText", "Name");
			iu.addParam("ListColumnFileSizeText", "Größe");
//			iu.addParam("ListColumnFileTypeText", "Typ");
			iu.addParam("ListColumnLastModifiedText", "Geändert am");
			iu.addParam("MegabytesText", "Megabytes");
			iu.addParam("MenuAddAllToUploadListText", "Alle zur Übertragungsliste hinzufügen");
			iu.addParam("MenuAddToUploadListText", "Zur Übertragungsliste hinzufügen");
			iu.addParam("MenuDeselectAllText", "Markierung aufheben");
			iu.addParam("MenuDetailsText", "Details");
			iu.addParam("MenuIconsText", "Symbole");
			iu.addParam("MenuInvertSelectionText", "Auswahl umkehren");
			iu.addParam("MenuListText", "Liste");
			iu.addParam("MenuRefreshText", "Aktualisieren");
			iu.addParam("MenuRemoveAllFromUploadListText", "Alle aus Übertragungsliste löschen");
			iu.addParam("MenuRemoveFromUploadListText", "Aus Übertragungsliste löschen");
			iu.addParam("MenuSelectAllText", "Alle auswählen");
			iu.addParam("MenuThumbnailsText", "Miniaturansicht");
			iu.addParam("MessageBoxTitleText", "StudiVZ PhotoUploader");
			iu.addParam("MessageCannotConnectToInternetText", "Die Internetverbindung kann nicht hergestellt werden.");
			iu.addParam("MessageDimensionsAreTooLargeText", "Das Bild [Name] kann nicht markiert werden. Die Pixelgröße dieses Bildes ([OriginalImageWidth]x[OriginalImageHeight]) ist zu Groß. Das Bild muss kleiner als [MaxImageWidth]x[MaxImageHeight] sein.");
			iu.addParam("MessageDimensionsAreTooSmallText", "Das Bild [Name] kann nicht markiert werden. Die Pixelgröße dieses Bildes ([OriginalImageWidth]x[OriginalImageHeight]) ist zu klein. Das Bild muss größer als [MinImageWidth]x[MinImageHeight] sein.");
			iu.addParam("MessageMaxFileCountExceededText", "Die maximale Dateianzahl wurde überschritten.");
			iu.addParam("MessageMaxFileSizeExceededText", "Die maximale Dateigröße wurde überschritten.");
			iu.addParam("MessageMaxTotalFileSizeExceededText", "Die maximale Gesamtdateigröße wurde überschritten.");
			iu.addParam("MessageNoFilesToSendText", "Keine Dateien zur Übertragung ausgewählt.");
			iu.addParam("MessageNoInternetSessionText", "Es konnte keine Internetverbindung hergestellt werden.");
			iu.addParam("MessageNoResponseFromServerText", "Es ist ein Fehler bei der Übertragung aufgetreten.");
			iu.addParam("MessageServerNotFoundText", "Der Server [Name] wurde nicht gefunden.");
			iu.addParam("MessageUploadCancelledText", "Die Übertragung wurde abgebrochen.");
			iu.addParam("MessageUploadCompleteText", "Die Übertragung wurde abgeschlossen.");
			iu.addParam("MessageUploadFailedText", "Die Übertragung schlug fehl.");
			iu.addParam("MessageUserSpecifiedTimeoutHasExpiredText", "Die von dem Benutzer festgelegte Zeit wurde überschritten.");
			iu.addParam("MinutesText", "Minuten");
			iu.addParam("ProgressDialogBytesSentText", "Bytes übertragen: [Current] von [Total]");
			iu.addParam("ProgressDialogCancelButtonText", "Abbrechen");
			iu.addParam("ProgressDialogCloseButtonText", "Schließen");
			iu.addParam("ProgressDialogCloseWhenUploadCompletesText", "Nach Übertragung schließen");
			iu.addParam("ProgressDialogEstimatedTimeText", "Geschätzte Dauer: [Current] von [Total]");
			iu.addParam("ProgressDialogPreparingDataText", "Fotos werden verkleinert...");
			iu.addParam("ProgressDialogTitleText", "Dateiübertragung");
			iu.addParam("ProgressDialogWaitingForResponseFromServerText", "Warten auf Serverantwort");
			iu.addParam("SecondsText", "Sekunden");
			iu.addParam("UnixFileSystemRootText", "Dateisystem");
			iu.addParam("UnixHomeDirectoryText", "Persönliches Verzeichnis");
			
			iu.addParam("CodePage", "28592");	//central european iso (for photo title)
			
			//END GERMAN TRANSLATION

			//For ActiveX control full path to CAB file (including file name) should be specified.
			iu.activeXControlCodeBase = "lib/imageuploader/ImageUploader4.cab";
			iu.activeXControlVersion = "4,0,33,0";

			//For Java applet only path to directory with JAR files should be specified (without file name).
			iu.javaAppletCodeBase = "lib/imageuploader//";
			iu.javaAppletCached = true;
			iu.javaAppletVersion = "2.0.35.0";
			
			iu.showNonemptyResponse = "off";

			iu.addParam("Layout", "TwoPanes");
			iu.addParam("FolderView", "Thumbnails");					

			//important, dont upload the source!!
			iu.addParam("UploadSourceFile", "false");

			iu.addParam("UploadThumbnail1FitMode", "fit");
			iu.addParam("UploadThumbnail1Width", "600");
			iu.addParam("UploadThumbnail1Height", "600");
			iu.addParam("UploadThumbnail1JpegQuality", "80");
			iu.addParam("UploadThumbnail1CopyExif", "false");
			
			iu.addParam("ShowButtons", "True");
			iu.addParam("ShowUploadListButtons", "True");
			iu.addParam("CheckFilesBySelectAllButton", "True");

			iu.addParam("ShowStatusPane", "False");
			
			iu.addParam("ShowUploadCompleteMessage", "false");

			//iu.addParam("Action", "Upload.aspx?SessionID=84dfdbc9-7ceb-4d31-bc3b-94a76cbbb05e");
			//iu.addParam("RedirectUrl", "PictureGallery.aspx");
			//iu.addParam("LicenseKey", "2640-3317-9228-4603;5934-7908-8998-8484");

			iu.addParam("Action", "addphotos.php?id=6VT");
			iu.addParam("RedirectUrl", "editalbum.php?a=1&id=6VT");

			iu.addParam("AllowRotate", "True");

			iu.addParam("MaxFileCount", "40");
			iu.addParam("MaxFileSize", "0");
			iu.addParam("MaxTotalFileSize", "125829120");
			iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.bmp;*.gif");

			iu.addParam("Padding", "0");
			iu.addParam("TreePaneWidth", "180");
			iu.addParam("BackgroundColor", "#ffc6c6");

			//Event Handler
			iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
			iu.addEventListener("ViewChange", "ImageUploader_ViewChange");
  			//iu.addEventListener("InitComplete", "ImageUploader_InitComplete");

			iu.fullPageLoadListenerName = "fullPageLoad";
			

			

iu.writeHtml();					

			</script>

Edited by user Tuesday, February 19, 2008 1:28:04 PM(UTC)  | Reason: Not specified

Fedor  
#2 Posted : Sunday, July 30, 2006 2:31:28 AM(UTC)
Fedor

Rank: Advanced Member

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

Thanks: 3 times
Was thanked: 52 time(s) in 51 post(s)
Stefan, I am sorry fo delay. I have reproduced the problem and it is very weird. I look for workaround to resolve the problem.
Best regards, Fedor Skvortsov
Fedor  
#3 Posted : Friday, August 25, 2006 11:21:00 PM(UTC)
Fedor

Rank: Advanced Member

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

Thanks: 3 times
Was thanked: 52 time(s) in 51 post(s)
After contacting with Opera we have found the workaround. In iuembed.js script we write <embed> tag for Image Uploader. In this case the problem you have reported has place. If we use <applet> tag it works just fine. We will fix iumebed.js so it uses <applet> tag to the next release.

Edited by user Tuesday, February 19, 2008 1:28:32 PM(UTC)  | Reason: Not specified

Best regards, Fedor Skvortsov
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.