How to Embed TVUPlayer using jQuery as AJAX?

danmcfly

New Member
I need to embed the TVUPlayer from TVUNetworks as AJAX. Embedding the player as HTML needs to put an script into the page and it works:\[code\]<script type="text/javascript" > src="http://dl.tvunetworks.com/webplayer/myTVU.js?c=640&w=500&h=370&autoplay=1&style=1"></script>\[/code\]But what I want to do is to load the player when the user clicks on this channel. The script has document.write. When I try to load it as text and embed it into the div, then the page document.write clears the page.I tried this:\[code\] var vUrl = "http://dl.tvunetworks.com/webplayer/myTVU.js?c=640&w=450&h=320&autoplay=1&style=2&TVUControlBar=1"; $.ajax({ url: vUrl, dataType: 'text', success: function (data) { getElementById(target.replace("#", "")).append(script); } })\[/code\]But not works.I appreciate any help. Even if it helps using an iFrame. The only thing I need is to embed the player as AJAX in Javascript.
 
Top