I have written a module (C#) that uses the JWPlayer via some JavaScript to show media (movies and music) on my DNN website. The JWPlayer is wrapped up in a DIV:
<div id="ViewArea">
<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({ flashplayer: "/jwplayer/player.swf", file: "<%=fName%>" , height: 270, width: 480 });
</script>
</div>
Quite simply I have a list of media files displayed in a list, and the user can select a file and it will be loaded up into the media player using HtmlGenericControl:
_useFile = "file name passed in via #eval";
System.Web.UI.HtmlControls.HtmlGenericControl Div = new System.Web.UI.HtmlControls.HtmlGenericControl("ViewArea");
Div.DataBind();
The JavaScript derives the <%=fName%> from a property:
public string fName
{
get { return _useFile; }
}
I have written this code and it works fine in C# alone, but when I port the same code over to DNN, it doesn't seem to want to update the DIV. I've enabled partial rendering, but still no joy. I've even tried firing off the JavaScript manually with a function being called via "OnClientClick", no joy that way either.
Any ideas where I might be going wrong?