Pulling javascript code from mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ephemie
    New Member
    • Sep 2008
    • 1

    Pulling javascript code from mysql

    Hi all,

    Not sure whether this is a javascript or MySql issue.

    Have below javascript code of embedded flash player stored in text field in MySql, with php reading it into a variable and echoing it, however no player shows.

    Code is seen when a view source of page is done, so it's reading it out ok. Am I missing escape characters or something else completely?

    Code runs ok in a normal html page.
    thx in advance

    [CODE=html]<script type="text/javascript" src="http://www.sitename.co m/video/swfobject.js"></script>
    <script type="text/javascript">
    var s1 = new SWFObject("http ://www.sitename.co m/video/flvplayer.swf", "player","400", "300","9");
    s1.addParam("al lowfullscreen", "true");
    s1.addParam("al lowscriptaccess ","always") ;
    s1.addParam("fl ashvars","file= http://external-site.com/video.flv");
    s1.write("previ ew");
    </script>[/CODE]
    Last edited by gits; Sep 23 '08, 06:54 AM. Reason: added code tags
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Could you post the PHP code as well.

    Comment

    Working...