Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't open JS files in Windows from Filezilla

I logged in to my FTP from Filezilla and tried to open a JS file, and it gave me the following error:

Script:    C:/.../slider.js
Line:      1
Char:      1
Error:     'document' is undefined
Code:      800A1391
Source:    Microsoft JScript runtime error

I have jQuery linked to the .php file as well...'document' comes from:

$(document).ready(function() {
    //Code is here...
});

I tried downloading the file and opening it, I tried removing the $(document).ready();, I tried removing jquery (which by the way, when I opened the jQuery file it gave me the same almost the same error). Any help is appreciated. Thanks!

EDIT:

One of the tags for this post was "asp.net", but to be honest I don't even know if it is related to asp.net...

like image 650
Bryce Avatar asked Nov 07 '12 18:11

Bryce


1 Answers

I had the same issue and fixed it by doing the following in Filezilla:

  1. Go to Edit > Settings
  2. Go to the 'File editing' section
  3. Under 'Default Editor': Ensure that Notepad++ is selected as your custom editor
  4. Change the radio button from 'Use filetype associations if available' to 'Always use default editor'
like image 55
amuhlou Avatar answered Sep 23 '22 13:09

amuhlou