Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    4
    Thanks
    3
    Thanked 1 Time in 1 Post

    How does this script work?

    Greetings,

    My friend runs a website which displays video streams which are hosted elsewhere. In the past, he used simple Iframes, but now he uses Javascript. I'd like to ask him how it works, but he is always is very busy working so I never see the chance to ask.

    I thought you all may help me understand this a bit more.

    Code:
    <script type='text/javascript'>id='gghghhgjjgh_19010'; width='640'; height='460';</script><script type='text/javascript' 
    src='http://espnwatch.net/player.js'></script>
    How does this work? I assume the id= calls another file (js?). The rest is pretty self explainatory.

    Thank you mates.

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Within the first script tag, variables are being initialized and given value.

    The second script tag 'includes' a .js file from an external source. If you enter that URL in a browser, it will display the JS code in clear text.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • Users who have thanked WolfShade for this post:

    FootballDizzle (09-26-2012)

  • #3
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    4
    Thanks
    3
    Thanked 1 Time in 1 Post
    Quote Originally Posted by WolfShade View Post
    Within the first script tag, variables are being initialized and given value.

    The second script tag 'includes' a .js file from an external source. If you enter that URL in a browser, it will display the JS code in clear text.
    Greetings WolfShade.

    Thank you very much for your response. I appreciate this!

    I will attempt entering the .js into browser.

    May I also add, I know that the espn js is not the "default" player for my friend videos. For example, if he hosts video on a site like "wcast tv", the automated script they give is
    Code:
    <script type="text/javascript" src="http://www.wcast.tv/embed.js"></script>
    .

    Using ESPN player JS (I believe) allows the advertisements which WCast places on their player.

    Is there any good places where I can read more about these types of scripts? I would like to learn but my Java/script experience is about 0.

    Also. Thank you for taking the time to address what I imagine is a very elementary question.


    Thanks you.

  • #4
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    If you want to learn JavaScript, you probably do not want to start by trying to translate code from players. There is so much more to JavaScript.

    This forum is an excellent source for learning by asking questions about code. Mostly, this forum is for troubleshooting existing code, but advice is also given on code that has not yet been written.

    Books are a good bet, too. Anything by O'Reilly Press is good; SitePoint is good, too.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • Users who have thanked WolfShade for this post:

    FootballDizzle (09-26-2012)


  •  

    Posting Permissions

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