This is a migrated thread and some comments may be shown as answers.

PostbackTriggers not working if the click event was triggered programmatically using JQuery trigger() or click() methods

2 Answers 246 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Omar
Top achievements
Rank 1
Omar asked on 21 Apr 2015, 08:28 PM

I have RadAsyncUpload control defined as following:

the PostbackTriggers property works fine if I have clicked the button "btnSave",  but in some case I need to simulate the button click automatically, 

None of the following javascript or JQuery methods solved my problem , they fire the click event but the files collections is always empty

function SaveMeeting() {
           document.getElementById('ctl00_PageBody_btnSave').onclick();
           //$('.btnSave').focus();
           //$('.btnSave').click();
           //$('.btnSave').trigger('click');
       }

<telerik:RadAsyncUpload Font-Size="Medium" ID="RadAsyncUpload1" runat="server" OnClientFilesUploaded="OnClientFilesUploaded" OnClientFileUploaded="onClientFileUploaded" OnClientFileUploading="OnClientFileUploading OnClientFileUploadFailed="OnClientFileUploadFailed" OnClientFileUploadRemoving="onClientFileUploadRemoving OnClientFileUploadRemoved="onClientFileUploadRemoved"MultipleFileSelection="Automatic" PostbackTriggers="btnSave" HttpHandlerUrl="~/UploadDocFileHandler.ashx"
 Height="16px"></telerik:RadAsyncUpload>     

2 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 24 Apr 2015, 01:36 PM
Hello Omar,

I have performed some local tests using the jQuery click method on the bntSave and it seems that the correct behavior is achieved. I am sending you the sample project that I have tested with. You can give it a try at your end and check how it differs from your implementation.

Regards,
Nencho
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Omar
Top achievements
Rank 1
answered on 07 Jun 2015, 05:51 AM

Thanks Nencho,

            It is working now (sure since two month and sorry for the late feedback)

Tags
AsyncUpload
Asked by
Omar
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Omar
Top achievements
Rank 1
Share this question
or