SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Running Scripts Locally

    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

  2. #2
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you're talking about php script then I can recommend xampp as a local web server.

  3. #3
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...what about JS?

  5. #5
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    js runs in the browser.

    you don't need a web server at all to run js.

  6. #6
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know, I asked because it doesn't seem to be working, hrm I'm going to try something else

  7. #7
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  8. #8
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FireFox, I hope that helps !

  9. #9
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, for FireFox you've got:

    1. Tools -> Error Console - for a quick look about problems you may have.
    2. 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

  10. #10
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  11. #11
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  12. #12
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post the code you claim is not working locally but is working live.

    I'm not convinced it works live but not locally.

  13. #13
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    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.

  14. #14
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code JavaScript:
    <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

  15. #15
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Are both the .js files in the same folder as the HTML file?

  16. #16
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I do It's working

  17. #17
    SitePoint Guru Chroniclemaster1's Avatar
    Join Date
    Jun 2007
    Location
    San Diego, CA
    Posts
    784
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Whatever you can do or dream you can, begin it.
    Boldness has genius, power and magic in it. Begin it now.

    Chroniclemaster1, Founder of Earth Chronicle
    A Growing History of our Planet, by our Planet, for our Planet.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •