Code snippets are HTML codes that you insert into the coding of your web page, and when a visitor is browsing your web page, specific information is shown. For example, you can show the name of the current song playing.

To begin, click on 'Code Snippets' from the left hand menu within your LiveWebDJ account. 


There are essentially two steps to start using the code snippets: 


  1. Main Code:

  • This is the primary code that must be placed directly above the </body> tag.

  • The </body> tag is generally one of the last codes on any web page.

  • This main code is what controls the rest of the magic.

  • Status & Info Codes:

    • Each individual Status/Info code can be used independently from each other.

    • Use one, two, three or all of them at the same time in no specific order.

    Here is an example of a small/minimal web page HTML code using a couple code snippets:


    <html>
    <head>
    <title>My Page Title</title>
    </head>
    <body>
    <p>Welcome to my radio station. We're currently playing <span id="current_song">Loading</span>.</p>
    <p>Next up, music by <span id="next_up">Loading</span>.</p>
    <p>The last song played was <span id="history_1">Loading</span>.</p>
    <script type="text/javascript" src="http://phx.livewebdj.com/v2.cgi?action=snippet_code"></script>
    <script type="text/javascript" src="http://phx.livewebdj.com/v2.cgi?action=snippet&sid=mylivewebdjusername"></script>
    </body>
    </html>