admin管理员组

文章数量:1326663

Hi can you help me to make a solution about my problem?

This is my code:

$(document).ready(function() {      
        $('#sample').load('sample.html')
});

after the script execute and the sample.html is now loaded where my...

<form action="upload.php" class="dropzone"></form>

is located the dropzone js is not working.

Please help me about this issue . I can't figured how to make a solution for this.

Thanks!

Hi can you help me to make a solution about my problem?

This is my code:

$(document).ready(function() {      
        $('#sample').load('sample.html')
});

after the script execute and the sample.html is now loaded where my...

<form action="upload.php" class="dropzone"></form>

is located the dropzone js is not working.

Please help me about this issue . I can't figured how to make a solution for this.

Thanks!

Share Improve this question asked Aug 1, 2013 at 6:17 MacrayMacray 312 bronze badges 4
  • is the dropzone form is loaded via the load() mand – Arun P Johny Commented Aug 1, 2013 at 6:19
  • Can you please elaborate more about it? is your JS is not working or CSS file is not picked up? – Netwidz Commented Aug 1, 2013 at 6:20
  • @ArunPJohny yes the dropzone form is loaded via load() – Macray Commented Aug 1, 2013 at 6:38
  • @FahizMohamed The dropzone.js is not working – Macray Commented Aug 1, 2013 at 6:39
Add a ment  | 

2 Answers 2

Reset to default 11

You need to tell dropzone to reparse the document. If you using jquery.load method Also only use Dropzone.discover method after uploader is fully loaded.

$('#sample').load('sample.html', function() {
  Dropzone.discover();
});

you need to use the $.getScript method to load the JS file.. getScript

$.getScript("yourJsPath", function(data, textStatus, jqxhr) {
   console.log(data); //data returned
   console.log(textStatus); //success
   console.log(jqxhr.status); //200
   console.log('Load was performed.');
});

本文标签: javascriptThe Dropzone is not working after Jquery load() executeStack Overflow