Welcome Guest Search | Active Topics | Members

Three Pane ImageUploader Options
DSCarl
Posted: Wednesday, July 05, 2006 9:38:45 AM
Rank: Member
Groups: Member

Joined: 4/26/2006
Posts: 61
Points: 0
Hello,

I want to be able to display a message/messagebox to a user if the user clicks on the upload button without first
putting image/images on the third pane in the three pane ImageUploader.

By the third pane, I mean the pane at the bottom. I am using Custom buttons.

How do I go about doing this. Any help will be greatly appreciated...

Thanks.

MyCarl.

Fedor
Posted: Wednesday, July 05, 2006 10:32:02 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
To show the alert just check whether UploadFileCount property has 0 value.


Code:
if (getImageUploader('ImageUploader1')==0){
   alert("Please select at least one file.");
}



However for better usability I recommend you to disable upload button when there are no files selected. You can check this condition in UploadFileCountChange event handler:


Code:
function ImageUploader_UploadFileCountChange() {
   document.getElementById("UploadButton").disabled = (getImageUploader('ImageUploader1')==0);
}

iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");



Best regards,
Fedor Skvortsov
DSCarl
Posted: Wednesday, July 05, 2006 1:41:04 PM
Rank: Member
Groups: Member

Joined: 4/26/2006
Posts: 61
Points: 0
Hello Fedor,

Thank you.

Best Regards,
MyCarl.
DSCarl
Posted: Thursday, July 06, 2006 5:22:02 AM
Rank: Member
Groups: Member

Joined: 4/26/2006
Posts: 61
Points: 0
Hello Fedor,

In addition to your suggestion, I did the following and it worked great......

Code:
var value = getImageUploader("ImageUploaderID").getUploadFileCount();

if (value == 0){
    alert("Please select at least one file.");
}


Once again, thanks for your suggestions and help.

Regards,
MyCarl.

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.