Installed the July 2012 Update for VS 2012 Express for Web and everything seemed to be fine. Ran my project a few times no problems. Now when I run it doesn't seem to load scripts such as jQuery and I get errors like $ is undefined or ko is undefined.
I haven't made any changes to the scripts or anything.
The only two things that have happened today was a dialog box asking me to normalize endings and installing the trial of the Electric Plum iOS Simulator.
Please help, all the restarts haven't helped me at all!
I looked at IE9 Developer Tools Console and got: SCRIPT1014: Invalid Character xxxx.js line1, character 1.
When I clicked on the error to debug that particular js file it came up with random characters like it was corrupted.
I think something must have gone seriously wrong with my Visual Studio for the js file to appear like this surely? Although it does seem like jQuery loads ok??
I remade manual js files which then started working but js files such as jQuery UI, knockout and others are also appearing corrupted when debugging. They are fine when viewed in VS???
No only happening on some files, for example 1st image is screenshot of what's happening when debugging and second is when I select another js file that doesn't come up with a script error:
By opening files, changing and resaving resolves the issue they had. But I can't possibly open every file and change it just in case as it will take forever plus found some css files had a problem too!!
Anyway I can update all files or refresh them in some way to avoid anymore errors?
breath2k
Contributor
2101 Points
821 Posts
Scripts suddenly not working
Jul 31, 2012 02:12 PM|LINK
Installed the July 2012 Update for VS 2012 Express for Web and everything seemed to be fine. Ran my project a few times no problems. Now when I run it doesn't seem to load scripts such as jQuery and I get errors like $ is undefined or ko is undefined. I haven't made any changes to the scripts or anything.
The only two things that have happened today was a dialog box asking me to normalize endings and installing the trial of the Electric Plum iOS Simulator.
Please help, all the restarts haven't helped me at all!
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: Scripts suddenly not working
Jul 31, 2012 02:43 PM|LINK
please check the script refernce is fine and the js script files are present and getting loaded properly
AidyF
Star
9204 Points
1570 Posts
Re: Scripts suddenly not working
Jul 31, 2012 02:44 PM|LINK
Do you have any errors being logged in the error console? An error in a script file can stop all the JS from working.
breath2k
Contributor
2101 Points
821 Posts
Re: Scripts suddenly not working
Jul 31, 2012 03:04 PM|LINK
I looked at IE9 Developer Tools Console and got: SCRIPT1014: Invalid Character xxxx.js line1, character 1.
When I clicked on the error to debug that particular js file it came up with random characters like it was corrupted.
I think something must have gone seriously wrong with my Visual Studio for the js file to appear like this surely? Although it does seem like jQuery loads ok??
breath2k
Contributor
2101 Points
821 Posts
Re: Scripts suddenly not working
Jul 31, 2012 03:13 PM|LINK
I remade manual js files which then started working but js files such as jQuery UI, knockout and others are also appearing corrupted when debugging. They are fine when viewed in VS???
AidyF
Star
9204 Points
1570 Posts
Re: Scripts suddenly not working
Jul 31, 2012 03:26 PM|LINK
Is the "corruption" the files being compressed? Anything you use to view them will need the ability to uncompress them first.
breath2k
Contributor
2101 Points
821 Posts
Re: Scripts suddenly not working
Jul 31, 2012 03:36 PM|LINK
No only happening on some files, for example 1st image is screenshot of what's happening when debugging and second is when I select another js file that doesn't come up with a script error:
breath2k
Contributor
2101 Points
821 Posts
Re: Scripts suddenly not working
Aug 01, 2012 02:07 PM|LINK
By opening files, changing and resaving resolves the issue they had. But I can't possibly open every file and change it just in case as it will take forever plus found some css files had a problem too!!
Anyway I can update all files or refresh them in some way to avoid anymore errors?