How to output large HTML chunk using JavaScript?

halabit

New Member
hi all i am trying to output a large html chunk that holds opening and closing javascript tags. The javascript included is a jw player script and its mixed with javascript dynamic variable +url and php variable $Title. i tried document.write but the player didn't show up in the browser !instead it output part of the document.write statements! could you guys help me fix this issue ? Thanks in advance.\[code\]document.write("<html>");document.write("<head>");document.write("<meta http-equiv="Content-Type" content="text/html; charset=utf-8">");document.write("</head>");document.write("<br>");document.write("Title:<?php echo $Title;?> <script type='text/javascript' src='http://stackoverflow.com/questions/13772709/jwplayer.js'></script>");document.write("<div id='mediaspace'>This text will be replaced</div>");document.write("<script type='text/javascript'>");document.write(" jwplayer('mediaspace').setup({");document.write("'flashplayer': './player.swf',");document.write("'file': + url,");document.write("'autostart': 'true',");document.write("'controlbar': 'bottom',");document.write("'width': '470',");document.write("'height': '320'");document.write("});");document.write("</script>");document.write("</html>"); \[/code\]
 
Back
Top