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

Notification

Icon
Error

Options
Go to last post Go to first unread
yei  
#1 Posted : Thursday, February 15, 2007 10:45:53 AM(UTC)
yei

Rank: Member

Groups: Member
Joined: 2/14/2007(UTC)
Posts: 2

Code:
var iu = new ImageUploaderWriter("ImageUploader1", 650, 700);

//Number of files which should be sent with a single request. (important)
iu.addParam("FilesPerOnePackageCount", "10");

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

//Switch that specifies whether original file should be uploaded or it is necessary to upload only resized copies
iu.addParam("UploadSourceFile", "false");

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletCodeBase = "../module/multi_upload/";
iu.javaAppletCached = true;
iu.javaAppletVersion = "2.1.1.0";

iu.showNonemptyResponse = "off";

//File mask for the files which are allowed to be displayed and uploaded.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.JPG;*.JPEG");

//Maximum file size which is allowed for upload to the server (byte).
//iu.addParam("MaxFileSize", "2097152");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "480");
iu.addParam("UploadThumbnail1Height", "480");
iu.addParam("UploadThumbnail1JpegQuality", "100");
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "96");
iu.addParam("UploadThumbnail2Height", "96");
iu.addParam("UploadThumbnail2JpegQuality", "100");

//Configure URL files are uploaded to.
iu.addParam("Action", '?csid=<?=$_REQUEST['csid']?>&id=multi_upload&cl=<?=$_REQUEST['cl']?>&mode=model8_multi_upload&m8k=<?=$_REQUEST['m8k']?>&_ulinktreeid=<?=$_REQUEST['_ulinktreeid']?>');

//Configure URL where to redirect after upload.
//iu.addParam("RedirectUrl", '?csid=<?=$_REQUEST['csid']?>&id=multi_upload&cl=<?=$_REQUEST['cl']?>&mode=model8_redirect&m8k=<?=$_REQUEST['m8k']?>&_ulinktreeid=<?=$_REQUEST['_ulinktreeid']?>');

//Configure miscellaneous settings.
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("EnableRotate", "true");
iu.addParam("BackgroundColor", "#ccccff");
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("ShowUploadListButtons", "true");
iu.addParam("FolderPaneHeight", "220");

//List of images that specify different states of the Add button (which adds selected files from folder pane to upload pane).
iu.addParam("ButtonAddToUploadListImageFormat", "width=56;height=25;urlnormal=../module/multi_upload/images/add.gif;UrlHot=../module/multi_upload/images/add_over.gif;urldisabled=../module/multi_upload/images/add_disabled.gif;UrlPressed=../module/multi_upload/images/add_over.gif");
iu.addParam("ButtonAddAllToUploadListImageFormat", "width=104;height=25;urlnormal=../module/multi_upload/images/add_all.gif;UrlHot=../module/multi_upload/images/add_all_over.gif;UrlPressed=../module/multi_upload/images/add_all_over.gif");
iu.addParam("ButtonSelectAllImageFormat", "width=87;height=25;urlnormal=../module/multi_upload/images/select_all.gif;UrlHot=../module/multi_upload/images/select_all_over.gif;UrlPressed=../module/multi_upload/images/select_all_over.gif");

iu.addParam("ButtonDeselectAllImageFormat", "width=87;height=25;urlnormal=../module/multi_upload/images/unselect_all.gif;UrlHot=../module/multi_upload/images/unselect_all_over.gif;UrlPressed=../module/multi_upload/images/unselect_all_over.gif");
iu.addParam("ButtonRemoveFromUploadListImageFormat", "width=60;height=25;urlnormal=../module/multi_upload/images/remove.gif;UrlHot=../module/multi_upload/images/remove_over.gif;urldisabled=../module/multi_upload/images/remove_disabled.gif;UrlPressed=../module/multi_upload/images/remove_over.gif");
iu.addParam("ButtonRemoveAllFromUploadListImageFormat", "width=104;height=25;urlnormal=../module/multi_upload/images/remove_all.gif;UrlHot=../module/multi_upload/images/remove_all_over.gif;urldisabled=../module/multi_upload/images/remove_all_disabled.gif;UrlPressed=../module/multi_upload/images/remove_all_over.gif");
iu.addParam("ButtonSendImageFormat", "width=87;height=25;urlnormal=../module/multi_upload/images/upload.gif;UrlHot=../module/multi_upload/images/upload_over.gif;urldisabled=../module/multi_upload/images/upload_disabled.gif;UrlPressed=../module/multi_upload/images/upload_over.gif");

//Text of the label displayed instead of the description when it is empty.
iu.addParam("EditDescriptionText", "相片說明");

//Localization
//Get the language to apply localization for.
var lang = window.location.search;
if (lang.length > 0 && lang.charAt(0) == "?") {
	lang = lang.substr(1,lang.indexOf('&')-1);
}


switch (lang) {
	case "zh-cn":
		zh_cn_resources.addParams(iu);
		break;
	case "zh":
		zh_resources.addParams(iu);
		break;
	default:
		lang = "en";
		en_resources.addParams(iu);
		break;
}


function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText)
{
    if (Status=="COMPLETE")
    {
        //window.opener.alert(StatusText);
        window.location = '?csid=<?=$_REQUEST['csid']?>&id=model8&cl=<?=$_REQUEST['cl']?>&mode=edit&m8k=<?=$_REQUEST['m8k']?>&_ulinktreeid=<?=$_REQUEST['_ulinktreeid']?>';
    }
}
iu.addEventListener("Progress", "ImageUploader_Progress");


//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.

iu.writeHtml();

These are my code and everything is ok except the "UrlHot" doesn't work.

Please tell me where the problem is,thanks....

Edited by user Thursday, February 21, 2008 6:25:55 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Thursday, February 15, 2007 8:06:21 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

There is a mistake in documentation. should to use UrlHover instead of UrlHot. We will fix it in the documentation in future releases.

Edited by user Thursday, February 21, 2008 6:27:03 PM(UTC)  | Reason: Not specified

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

yei  
#3 Posted : Sunday, March 4, 2007 3:59:28 PM(UTC)
yei

Rank: Member

Groups: Member
Joined: 2/14/2007(UTC)
Posts: 2

'UrlHover' works , thanks!
Users browsing this topic
Guest
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.