Welcome Guest Search | Active Topics | Sign In | Register

eo:AJAXUploader Options
Ismael
Posted: Wednesday, August 24, 2011 3:51:26 PM
Rank: Member
Groups: Member

Joined: 2/3/2009
Posts: 28
is there a way to for calidation on a dropdown once the user clicks on the upload button? what I am trying to do is to check the value of a drop down box once the user click the uplad button, if the validation is false then I would like to stop the upload process and display error message to the user.
eo_support
Posted: Wednesday, August 24, 2011 9:28:46 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will need to do it the other way around:

1. Customize the AJAXUploader's LayoutTemplate to remove the default upload button;
2. Use your own Upload button and handle onclick for that button with JavaScript;
3. Inside your event handler, performs whatever validation you wish to perform;
4. If the validation passes, you would call the AJAXUploader's upload method to start the upload. If the validation fails, then you do not call upload. The code will be something like this:

Code: JavaScript
function your_click_handler()
{
    //Perform your validation logic
    if (validate_your_drop_down())
    {
        //Get the uploader object
        var uploader = eo_GetObject("AJAXUploader1");

        //Start the upload
        uploader.upload();
    }
}


Hope this helps.

Thanks!


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.