EasyUI Forum
May 03, 2024, 06:46:35 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Filebox accept does not seem to work  (Read 5575 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: October 19, 2017, 08:31:46 PM »

This allows me to select any file and does not limit the selection to .xls, .xlsx files ??

Code:
        $('#xfiles').filebox({
          multiple: false,
          buttonText: 'Choose File',
          buttonAlign: 'left',
          accept:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel',
          onChange: function(nv,ov){
            $(this).textbox('textbox')[0].value = nv.replace("C:\\fakepath\\", "");
            var tgt = $(this).next().find('.textbox-value')[0];
            xl2json(tgt,function(res){
              alert(JSON.stringify(res))
          });       
          }
        })
Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 19, 2017, 11:46:34 PM »

Some browsers don't support the 'accept' property. If you are using IE9 or lower versions, this property accept will be ignored.
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 on: October 20, 2017, 06:24:01 AM »

Thanks, I am using chrome latest version ?
Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: October 20, 2017, 08:09:59 AM »

The 'accept' property does not supported in version 1.4.4. To solve this issue, please download the patch from https://www.jeasyui.com/download/downloads/jquery-easyui-1.4.4-patch.zip.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!