shashalien / upload-at-click

Automatically exported from code.google.com/p/upload-at-click
0 stars 0 forks source link

Use a file .js instead <script></script> #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
How to reproduce the problem?
Moving

<script type="text/javascript">
   var uploader = document.getElementById('uploader');
   upclick(
     {
      element: uploader,
      action: '/path_to/you_server_script.php', 
      onstart:
        function(filename)
        {
          alert('Start upload: '+filename);
        },
      oncomplete:
        function(response_data) 
        {
          alert(response_data);
        }
     });
   </script>

into a file .js

it return this error:

 Uncaught TypeError: Cannot read property 'ownerDocument' of undefined (upclick.js:45)

Original issue reported on code.google.com by antonio....@gmail.com on 21 Feb 2015 at 10:36

msantoshdora commented 8 years ago

How you have linked the script to the html code? Is it like this :

. If not then please clearify this issue.