Determine which upload control was clicked using javascript

Last post 10-26-2010, 2:53 PM by SMarshall. 2 replies.
Sort Posts: Previous Next
  •  10-24-2010, 8:29 PM 64652

    Determine which upload control was clicked using javascript

    I have more than one upload control on a page uploading different types of files (images, mp3, etc).
     
    I need to determine which control was used with the javascript CuteWebUI_AjaxUploader_OnTaskComplete so I can execute some client side code.
     
    So, if the user clicks the Upload1 control I can execute client side code after a successful upload for that specific control. 
     
    Is there a way that the javascript OnTaskComplete can say which upload control on the page was used to upload the file? If I could get the javascript function to grab the ID of the upload control, that would be cool.
     
    Thanks!
  •  10-24-2010, 8:43 PM 64654 in reply to 64652

    Re: Determine which upload control was clicked using javascript

    Hi,
     
    Please try this :
     
    function CuteWebUI_AjaxUploader_OnTaskComplete(task)
    {
            var uploader=this;
            alert(uploader.id);
    }
     
    Regards,
    Terry
     
  •  10-26-2010, 2:53 PM 64708 in reply to 64654

    Re: Determine which upload control was clicked using javascript

    This works! Great! Thanks!
View as RSS news feed in XML