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

Notification

Icon
Error

Options
Go to last post Go to first unread
Robi  
#1 Posted : Thursday, September 28, 2006 3:16:43 AM(UTC)
Robi

Rank: Member

Groups: Member
Joined: 8/29/2006(UTC)
Posts: 5

Hello, I'm trying to put image on buttons instead of using raw text. I followed everything (I hope so!!) that's written in the help file. Component loads without any problems with ActiveX and Java version but image buttons aren't visible... Could you give me a hint? Here is my code :
Code:
<script type="text/javascript">
	//<![CDATA[
	//Create JavaScript object that will embed Image Uploader to the page.
	var iu = new ImageUploaderWriter("ImageUploader1", 660, 500);

	iu.activeXControlCodeBase = "ImageUploader4.cab";
	iu.activeXControlVersion = "4,0,47,0";

	//For Java applet only path to directory with JAR files should be specified (without file name).
	iu.javaAppletCodeBase = "/";
	iu.javaAppletCached = false;
	iu.javaAppletVersion = "2.0.50.1";
	iu.addParam("TimeOut", "300000");
					
	iu.showNonemptyResponse = "off";

	//Configure appearance and behavior.
	iu.addParam("PaneLayout", "ThreePanes");
	iu.addParam("FolderPaneHeight", "200");
	iu.addParam("ShowDebugWindow", "true");
	iu.addParam("AllowMultipleRotate", "true");
	iu.addParam("AllowMultipleRemove", "true");
	iu.addParam("EnableRemoveIcon", "true");
	iu.addParam("FolderPaneAllowRotate", "true");
	iu.addParam("FolderPaneShowDescriptions", "false");
	iu.addParam("AllowRotate", "true");
	iu.addParam("UploadPaneAllowRotate", "true");
	iu.addParam("UploadPaneShowDescriptions", "false");

	//Configure file mask to display JPEG images only.
	iu.addParam("FileMask", "*.jpg;*.jpe;*.jpeg");

	//Upload thumbnail
	iu.addParam("UploadThumbnail1FitMode", "Fit");
	iu.addParam("UploadThumbnail1Width", "120");
	iu.addParam("UploadThumbnail1Height", "120");
	iu.addParam("UploadThumbnail1JpegQuality", "60");
	iu.addParam("ShowDescriptions", "false");

	//...other params...
	//Labels
	//Buttons
	iu.addParam("ButtonSelectAllText", "");
	iu.addParam("ButtonDeselectAllText", "");
	iu.addParam("ButtonSendText", "");
	iu.addParam("ButtonAddToUploadListText", "");
	iu.addParam("ButtonAddAllToUploadListText", "");
	iu.addParam("ButtonRemoveFromUploadListText", "");
	iu.addParam("ButtonRemoveAllFromUploadListText", "");

	iu.addParam("ButtonAddToUploadListImageFormat", "Width=79px;Height=21px;UrlNormal=/albums/images/btn_ajouter.gif;UrlHot=/albums/images/btn_ajouter_over.gif;UrlDisabled=/albums/images/btn_ajouter_off.gif");
	iu.addParam("ButtonAddAllToUploadListImageFormat", "Width=104px;Height=21px;UrlNormal=/albums/images/btn_ajouter_all.gif;UrlHot=/albums/images/btn_ajouter_all_over.gif;UrlDisabled/albums/images/btn_ajouter_all_off.gif");
	iu.addParam("ButtonRemoveFromUploadListImageFormat", "Width=92px;Height=21px;UrlNormal=/albums/images/btn_remove.gif;UrlHot=/albums/images/btn_remove_over.gif;UrlDisabled=/albums/images/btn_remove_off.gif");
	iu.addParam("ButtonRemoveAllFromUploadListImageFormat", "Width=114px;Height=21px;UrlNormal=/albums/images/btn_remove_all.gif;UrlHot=/albums/images/btn_remove_all_over.gif;UrlDisabled=/albums/images/btn_remove_all_off.gif");
	iu.addParam("CacheGuiGraphics", "false");
	
	//Configure URL files are uploaded to.
	iu.addParam("Action", "<%=GetUploadUrl()%>");
	
	//Configure URL where to redirect after upload.
	iu.addParam("RedirectUrl", "<%=GetGalleryUrl()%>");

	//Tell Image Uploader writer object to generate all necessary HTML code to embed 
	//Image Uploader to the page.
	iu.writeHtml();
	//]]>
</script>
Thanks! Phil

Edited by user Tuesday, February 19, 2008 2:43:10 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Thursday, September 28, 2006 4:25:16 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello Phil, Here is the list of changes you should do to make your code work: 1) Comment these strings:
Code:
//iu.addParam("ButtonAddToUploadListText", "");
//iu.addParam("ButtonAddAllToUploadListText", "");
//iu.addParam("ButtonRemoveFromUploadListText", "");
//iu.addParam("ButtonRemoveAllFromUploadListText", "");
If button’s text is empty string the button is hidden (in current version of Image Uploader). So don’t set it to empty string. 2) Set Width and Height without "px" appendix:
Code:
iu.addParam("ButtonAddToUploadListImageFormat", "Width=79;Height=21;UrlNormal=/albums/images/btn_ajouter.gif;UrlHot=/albums/images/btn_ajouter_over.gif;UrlDisabled=/albums/images/btn_ajouter_off.gif");
That’s all.

Edited by user Tuesday, February 19, 2008 2:42:53 PM(UTC)  | Reason: Not specified

Sincerely yours, Alex Makhov UserPostedImage Follow Aurigma on Twitter!
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.