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

Notification

Icon
Error

Options
Go to last post Go to first unread
saravanakumar.gg  
#1 Posted : Thursday, April 12, 2007 10:03:33 PM(UTC)
saravanakumar.gg

Rank: Member

Groups: Member
Joined: 3/30/2007(UTC)
Posts: 10

Hi, I like to change the upload thumbnail format[size] based on the user format. For example, I am having 5 images, 2 images of size - 9x13 and 1 - 10x13 and 2 - 20x27 for 9x13 transmode_id - 1
Code:
document.getElementById("ImageUploader").UploadSourceFile = "False";
document.getElementById("ImageUploader").UploadThumbnail1FitMode = "Fit";
document.getElementById("ImageUploader").UploadThumbnail1JpegQuality = "90";
document.getElementById("ImageUploader").UploadThumbnail1Width = "3200";
document.getElementById("ImageUploader").UploadThumbnail1Height = "3200";
document.getElementById("ImageUploader").UploadThumbnail1CopyExif ="true";
for 10x13 transmode_id - 3
Code:
document.getElementById("ImageUploader").UploadSourceFile = "False";
document.getElementById("ImageUploader").UploadThumbnail1FitMode = "Fit";
document.getElementById("ImageUploader").UploadThumbnail1JpegQuality = "90";
document.getElementById("ImageUploader").UploadThumbnail1Width = "1600";
document.getElementById("ImageUploader").UploadThumbnail1Height = "1600";
document.getElementById("ImageUploader").UploadThumbnail1CopyExif = "true";
for 20x27 transmode_id - 5
Code:
document.getElementById("ImageUploader").UploadSourceFile = "true";
document.getElementById("ImageUploader").UploadThumbnail1FitMode= "false";
Is it possible to change the setting dynamically in Progress Event ? I tried the following script.. The transmode_id values are assigned when the user selects the image format, so each image will have a seperate transmode_id.
Code:
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText) 
{
    if(StatusText != uploadStatusText && (Status=="PREPARE" || Status=="START"))
    {       
        uploadStatusText = StatusText;
        if(transmode_id == 5) 
        {
            document.getElementById("ImageUploader").UploadSourceFile = "true";
            document.getElementById("ImageUploader").UploadThumbnail1FitMode= "false";
        }
        else if(transmode_id == 1) 
        {
            document.getElementById("ImageUploader").UploadSourceFile = "False";
            document.getElementById("ImageUploader").UploadThumbnail1FitMode = "Fit";
            document.getElementById("ImageUploader").UploadThumbnail1JpegQuality = "90";
            document.getElementById("ImageUploader").UploadThumbnail1Width = "3200";
            document.getElementById("ImageUploader").UploadThumbnail1Height = "3200";
            document.getElementById("ImageUploader").UploadThumbnail1CopyExif ="true";
        }
        else if(transmode_id == 3) 
        {
            document.getElementById("ImageUploader").UploadSourceFile = "False";
            document.getElementById("ImageUploader").UploadThumbnail1FitMode = "Fit";
            document.getElementById("ImageUploader").UploadThumbnail1JpegQuality = "90";
            document.getElementById("ImageUploader").UploadThumbnail1Width = "1600";
            document.getElementById("ImageUploader").UploadThumbnail1Height = "1600";
            document.getElementById("ImageUploader").UploadThumbnail1CopyExif = "true";
        }
    }
}
But this above script works only for the first assigned value of transmode_id. And the same upload setting is executed for all the remaining images. So i am not able to upload the images to the server with resp. format. Pls help.. Thanks

Edited by user Tuesday, December 18, 2007 4:05:10 AM(UTC)  | Reason: Not specified

Saravana Kumar G.G
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.