We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

drag & drop not working: Cannot read property 'dropAreaText' of undefined

Hi,

Can you please have a look at attached code and tell me why the drag & drop area of the uploadbox control is not visible/working?
(page: WebForm1.aspx)

I see below error in chrome:

ej.web.all.min.js:10 Uncaught TypeError: Cannot read property 'dropAreaText' of undefined
    at Object._dragAndDrop (ej.web.all.min.js:10)
    at Object._initialize (ej.web.all.min.js:10)
    at Object._init (ej.web.all.min.js:10)
    at new <anonymous> (ej.web.all.min.js:10)
    at init.n.fn.(anonymous function) [as ejUploadbox] (http://localhost:56919/js/syncfusion/Scripts/ej/ej.web.all.min.js:10:23743)
    at WebForm1.aspx:58


Thank you
Frederik




Attachment: WebApplication_uploadbox_63769323.rar

3 Replies

DL Deepa Loganathan Syncfusion Team January 16, 2019 01:02 PM UTC

 
Hi Frederik,  
 
Thanks for contacting Syncfusion support.  
 
We have analyzed the reported issue with Uploadbox and suspect that the issue must be possibly because the localized text for the culture you were trying to set “nl-BE” is not defined in your application. So, you need to add the localized text for this culture to get rid of this issue as depicted in the below code.  

<script src="js/syncfusion/ej.culture.nl-BE.js"></script> 
 
ej.Uploadbox.Locale = ej.Uploadbox.Locale || {}; 
ej.Uploadbox.Locale["nl-BE"] = { 
    buttonText: { 
        upload: "Uploaden", 
        browse: "Blader", 
        cancel: "Annuleer", 
        close: "Dichtbij" 
    }, 
    dialogText: { 
        title: "Upload Box", 
        name: "Naam", 
        size: "Grootte", 
        status: "toestand" 
    }, 
    dropAreaText: "Drop bestanden of klik om te uploaden", 
    filedetail: "Het geselecteerde bestand is te groot. Selecteer een bestand binnen het geldige grootte.", 
    denyError: "Bestanden met #Extension extensies zijn niet toegestaan.", 
    allowError: "Alleen bestanden met #Extension extensies zijn toegestaan.", 
    cancelToolTip: "Annuleer", 
    removeToolTip: "Verwijderen", 
    retryToolTip: "opnieuw proberen", 
    completedToolTip: "Voltooid", 
    failedToolTip: "Mislukt", 
    closeToolTip: "Dichtbij", 
} 
 
  
Please find the corrected sample in the below link.  
 
 
Regards,  
Deepa L.


FG Frederik Gysel January 16, 2019 07:18 PM UTC

It works, thanks a lot for your help!

Rgds
Frederik


PO Prince Oliver Syncfusion Team January 17, 2019 05:11 AM UTC

Hi Frederik,   

Most Welcome. We are glad that the issue is resolved in your end. Please let us know if you need any further assistance on this. 

Regards, 
Prince 


Loader.
Up arrow icon