EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: patana on July 25, 2016, 02:40:47 AM



Title: Problem with loading data into filebox
Post by: patana on July 25, 2016, 02:40:47 AM
I have datagrid to hold the rows data.
By clicking edit on each row, it will pop up data into form field.
I used filebox inside the form. The problem i got "SecurityError: The operation is insecure."
Any solution to load data(field) into filebox?
Thanks,


Title: Re: Problem with loading data into filebox
Post by: stworthy on July 26, 2016, 12:38:07 AM
Due to the security, you can't set the value of a filebox.


Title: Re: Problem with loading data into filebox
Post by: patana on July 26, 2016, 06:55:50 PM
Anyway to show up the text inside it when pop up the form?


Title: Re: Problem with loading data into filebox
Post by: stworthy on July 27, 2016, 12:53:55 AM
Please try to add this code to your page.
Code:
<script type="text/javascript">
$.extend($.fn.form.defaults, {
fieldTypes: ['combobox','combotree','combogrid','datetimebox','datebox','combo',
    'datetimespinner','timespinner','numberspinner','spinner',
    'slider','searchbox','numberbox','filebox','passwordbox','textbox','switchbutton']

});

$.extend($.fn.filebox.methods, {
setValue: function(jq){
return jq;
}
})
</script>