ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

I need some help using a channel entry into a javacript

August 09, 2012 1:29am

Subscribe [2]
  • #1 / Aug 09, 2012 1:29am

    Vivianne

    2 posts

    Hey guys,

    I’m trying to use JPlayer to play mp3 files. I just can’t find the right way to insert the channel entries into the javascript, as I’m not very familiar with javascript.

    The script looks like this:

    [removed]                 $(document).ready(function() {     $("#jquery_jplayer_1").jPlayer({         ready: function(event) {             $(this).jPlayer("setMedia", {                 mp3: "http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",                 oga: "http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg"             });         },         swfPath: "http://www.jplayer.org/2.1.0/js",         supplied: "mp3, oga"     }); });                 [removed]

     

    I appreciate any help!

  • #2 / Aug 09, 2012 9:52am

    Tyssen

    756 posts

    You might need to set the protect_javascript config variable to ‘n’: http://ellislab.com/expressionengine/user-guide/general/hidden_configuration_variables.html#protect-javascript

  • #3 / Aug 12, 2012 11:05am

    Vivianne

    2 posts

    Thank you!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases