www.webdeveloper.com
Results 1 to 2 of 2

Thread: Help me understand this ad embed code!

  1. #1
    Join Date
    Mar 2009
    Posts
    31

    Help me understand this ad embed code!

    Hey,

    I was going through a script from Videoegg which the user puts onto their own site(s) to display video ads. Here is the script:

    Code:
    <script>
    var ve_publisher = "testPublisher";
    var ve_site = "testSite";
    var ve_area = "testArea";
    var ve_width = 728;
    var ve_height = 90;
    document.write("<script src='http://core.videoegg.com/eap/html/js/init.js?" + Math.random() + "'><\/script>");
    </script>
    I'm wondering what exactly is going on in the script (I'm extremely new to JavaScript). From what I understand, the first 5 lines of code are setting up variables. Right? The document.write part is confusing me a bit. Is it calling an external javaScript file which uses the variables determined in the first 5 lines of the script?

    Any help would be great, since I need to understand how to create a similar kind of script to allow my users to place the embed code (seperate from videegg) on their sites.

    Thank you very much.

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    It's adding the javascript file to the document. Assumption is that that script contains additional functions that embed the videos.
    54 68 65 42 65 61 72 4D 61 79

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles