3 Answers, 1 is accepted
0
james
Top achievements
Rank 2
answered on 01 Jun 2008, 10:23 AM
Hi,
I find one solution
I was add event on response started. Then I search file input. And rise click().
My code:
But in this solution is one problem. On submit I get error: "htmlfile: Access is denied.".
What is problem in my case?
is it possible to get browse window with RadUpload's client side API.
I find one solution
I was add event on response started. Then I search file input. And rise click().
My code:
function conditionalPostback(e, sender) |
{ |
if (sender.EventTarget.indexOf("$btn_20_10") != -1) |
{ |
var upload = $find("ctl00_ctl00_ContentPlaceHolder_ContentPlaceHolder_RadUpload1"); |
var uploadBrowse = document.getElementById("ctl00_ctl00_ContentPlaceHolder_ContentPlaceHolder_RadUpload1file0"); |
uploadBrowse.click(); |
//AJAX is disabled only if file is selected for upload |
if(upload.getFileInputs()[0].value != "") |
{ |
sender.EnableAjax = false; |
} |
} |
} |
But in this solution is one problem. On submit I get error: "htmlfile: Access is denied.".
What is problem in my case?
is it possible to get browse window with RadUpload's client side API.
0
james
Top achievements
Rank 2
answered on 01 Jun 2008, 10:26 AM
I think that is problem, because I didn't disable Ajaix on uploadBrowse How I can disable Ajaix for all elements?
Thanks inadvance,
J
Thanks inadvance,
J
0
Hi james,
The reason for the "Access is denied" error is not related to disabling Ajax calls. Actually this is a limitation of the browser. When the click method of an HTML file input element is called, the attempt for a form submission either throws an "Access is denied" error, or gets canceled (and the file input field gets cleared).
To my regret calling the Browse dialog through javascript code is not possible in terms of server-side form submission.
Kind regards,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The reason for the "Access is denied" error is not related to disabling Ajax calls. Actually this is a limitation of the browser. When the click method of an HTML file input element is called, the attempt for a form submission either throws an "Access is denied" error, or gets canceled (and the file input field gets cleared).
To my regret calling the Browse dialog through javascript code is not possible in terms of server-side form submission.
Kind regards,
Erjan Gavalji
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center