I assume I need to install a server to view scripts locally just want to confirm, and maybe a recommendation ? I know of one at the top of my head but forgot
Iâll second XAMPP â works great, simple to configure, but it gives you a real Apache/php/mySQL setup locally on your normal workstation.
Itâs also handy when testing from VMâs when you donât necessarily want them having direct access to the directories on the host OS.
js runs in the browser.
you donât need a web server at all to run js.
âŚwhat about JS?
I know, I asked because it doesnât seem to be working, hrm Iâm going to try something else
Specifying the browser youâre trying to test your scripts in may also provide us with insight otherwise hard to guess as to what the problem really is
FireFox, I hope that helps !
Well, for FireFox youâve got:
- Tools -> Error Console - for a quick look about problems you may have.
- Firebug - you can play around Console or Script in there: run scripts, debug, all sorts.
You must also have Javascript enabled:
Tools -> Options -> Content [tab] -> Enable Javascript [checkbox].
But you need to be so much more specific about a problem, if any
Error, console error âJScript not definedâ but it does work live !
You must also have Javascript enabled:
Tools -> Options -> Content [tab] -> Enable Javascript [checkbox].
It was already enabled.
Well
JScript is a scripting language based on the ECMAScript standard that is used in Microsoftâs Internet Explorer.
So, you probably have the right syntax, e.g. <script type=âtext/javascriptâ> ?
Itâs also seems your code is IE specific, like using ActiveX: window.ActiveXObject.
post the code you claim is not working locally but is working live.
Iâm not convinced it works live but not locally.
perhaps/its/an/incorrect/path/to/an/external/script.js
/possibly/an/absolute/path.js
rather/than/a/relative/one.js
âŚ/or/the/script/is/in/a/parent/directory.js
or/just/isnt/there/at/all/
Report the locations of all files involved and the <script type=âtext/javascriptâ src=â?â></script> from the HTML document.
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery.flip.min.js"></script>
Here is the script I have in my head.
So, you probably have the right syntax, e.g. <script type=âtext/javascriptâ> ?
I have this correct
Are both the .js files in the same folder as the HTML file?
Now I do Itâs working
Windows can also play havoc with client-side scripts. The Internet configuration (Internet Options, etc.) typically sets locally run scripts as a much higher level of security threat than scripts running on the web. Iâve never understood this, but itâs one of the reasons I usually test my JS through a web server (I program in .NET and use the test server in Visual Web Developer Express). Not sure how you solve your issue, but this can be an unpleasant little problem.