#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    59
    Rep Power
    1

    Read Java Script Library from Website


    I was wondering if you know of a way to read the code for Java script that is in a .js folder. I have been looking at code and would like to work with Java and CSS more but I can not find where to look for it. In Google chrome I use the inspect element so I can read the Html. I would like to be able to to this with Java scripts and CSS style folders.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,008
    Rep Power
    2791
    http://www.devshed.com/js/unminified.js. Is that your question?
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    59
    Rep Power
    1

    Hey


    Yes but is it possible to read any sites Java script like I do HTML? I need to make a Java Script and have seen sites I like but I can not read the Java script to make my own function.

    This is still about the Name function where I want to have a drop down tab and be able to click the name and have a bio on each person. I would like to use Java script for this.
  6. #4
  7. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,008
    Rep Power
    2791
    I am having a really difficult time understanding what you are writing. What do you mean by "is it possible to read any sites Java script like I do HTML?"?
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    59
    Rep Power
    1
    Files that are saves off the page that either style or add a function to a website.
  10. #6
  11. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,934
    Rep Power
    4033
    All you have to do is locate the URL for the javascript file in the pages HTML source, then open that URL. The browser will either display the JS source or offer to download the file, after with you can open it in your favorite editor.

    The main issue with JS is that a lot of sites will minify their JS source so that it appears as a big jumbled mess. There are some tools on the web that can help by re-adding whitespace, but often variable/function names are altered as well so the source is still fairly unreadable.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    59
    Rep Power
    1

    Hey


    Thanks for the help. I was able to find the Java script tag in the Head and then I was able to look at it without the white space. Thought I found that sometimes html pages have the java script on the site as well.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    59
    Rep Power
    1
    <SCRIPT LANGUAGE="javascript" SRC="javascript/JSFX_Layer.js"></SCRIPT>

    Well I want this it is is an external ".js" file. It is just a text file that contains functions to execute the code of the script as opposed to having all the script in the document itself.

    I have a website the I want to use this on. I just wish I know more on this and how to nest the code.
  16. #9
  17. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Location
    Pennsylvania, USA
    Posts
    35
    Rep Power
    1
    You can include an entire URL in your JavaScript src statement. Example:

    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script>
    Just make sure that the online library you are relying on loads quickly and is hosted by someone reliable; otherwise, your page may get broken,
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    59
    Rep Power
    1
    Yes thank I know this I am learning to use dynamic Html and Java script. So that all my pages have the same layout and just one part changes. Thanks for your help.

IMN logo majestic logo threadwatch logo seochat tools logo