Welcome Guest Search | Active Topics | Members

Upload only the 2nd or 3rd thumbnail Options
sandroriz
Posted: Friday, July 08, 2005 8:23:00 AM
Rank: Member
Groups: Member

Joined: 5/9/2005
Posts: 2
Points: 0
I`m trying to upload the thumbnails created by the activex but in the order choosen by the user... Eg.

I give the possibility to create 3 versions (100x100, 640x480, 800x600)

If the user check to send only the second thumb, instead to send the file resized to the right values (640x480) it will be sent a 96x60 image...

Code:
<input type="checkbox" name="Send1" value="Y">Create Thumb 1?
<input type="checkbox" name="Send2" value="Y">Create Thumb 2?
<input type="checkbox" name="Send3" value="Y">Create Thumb 3?


... input fields for width, height, quality

Code:
function Send()
      {
      var f = document.form1;
      var ImageUploader = document.getElementById("ImageUploader");
      ImageUploader.UploadSourceFile = f.SendOriginal.checked;
      ImageUploader.UploadThumbnail1FitMode = "Off";
      ImageUploader.UploadThumbnail2FitMode = "Off";
      ImageUploader.UploadThumbnail3FitMode = "Off";
      if (f.Send1.checked) {
            ImageUploader.UploadThumbnail1FitMode = "fit";
            ImageUploader.UploadThumbnail1Width = f.Width1.value;
            ImageUploader.UploadThumbnail1Height = f.Height1.value;
            ImageUploader.UploadThumbnail1JpegQuality = f.Quality1.value;
      }
      if (f.Send2.checked) {
            ImageUploader.UploadThumbnail2FitMode = "fit";
            ImageUploader.UploadThumbnail2Width = f.Width2.value;
            ImageUploader.UploadThumbnail2Height = f.Height2.value;
            ImageUploader.UploadThumbnail2JpegQuality = f.Quality2.value;
      }
      if (f.Send3.checked) {
            ImageUploader.UploadThumbnail3FitMode = "fit";
            ImageUploader.UploadThumbnail3Width = f.Width3.value;
            ImageUploader.UploadThumbnail3Height = f.Height3.value;
            ImageUploader.UploadThumbnail3JpegQuality = f.Quality3.value;
      }            
      ImageUploader.Send();
      }



Any idea ?

Thanks
Sandro

========================================================
02/14/2008, Fedor
This topic is out of date.

You should use iuembed.js syntax now:


Code:
function Send()
    {
    var f = document.form1;
    var ImageUploader = getImageUploader("ImageUploader");
    ImageUploader.setUploadSourceFile(f.SendOriginal.checked);
    ImageUploader.setUploadThumbnail1FitMode("Off");
    ImageUploader.setUploadThumbnail2FitMode("Off");
    ImageUploader.setUploadThumbnail3FitMode("Off");
    if (f.Send1.checked) {
        ImageUploader.setUploadThumbnail1FitMode("fit");
        ImageUploader.setUploadThumbnail1Width(f.Width1.value);
        ImageUploader.setUploadThumbnail1Height(f.Height1.value);
        ImageUploader.setUploadThumbnail1JpegQuality(f.Quality1.value);
    }
    if (f.Send2.checked) {
        ImageUploader.setUploadThumbnail2FitMode("fit");
        ImageUploader.setUploadThumbnail2Width(f.Width2.value);
        ImageUploader.setUploadThumbnail2Height(f.Height2.value);
        ImageUploader.setUploadThumbnail2JpegQuality(f.Quality2.value);
    }
    if (f.Send3.checked) {
        ImageUploader.setUploadThumbnail3FitMode("fit");
        ImageUploader.setUploadThumbnail3Width(f.Width3.value);
        ImageUploader.setUploadThumbnail3Height(f.Height3.value);
        ImageUploader.setUploadThumbnail3JpegQuality(f.Quality3.value);
    }        
    ImageUploader.Send();
    }


========================================================
Alex Makhov
Posted: Saturday, July 09, 2005 3:09:00 AM

Rank: Advanced Member
Groups: Member

Joined: 8/3/2003
Posts: 996
Points: 1
Hello,

I have tried to use your sample. It works fine.
Could you show the whole page source code?

Sincerely yours,
Alex Makhov
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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.