Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorHelp with plugin - sending dynamic script to html documentHelp with plugin - sending dynamic script to html document
Previous
 
Next
New Post
10/8/2008 10:24 AM
 

I'm trying to create a plugin to insert an flv file using the flowplayer viewer.  That part is working great.  However, as part of my plugin, I want to display a preview of the movie after it is selected in the dialog.  Here is the script I have:

function UpdatePreview()
{   
    var thisUrl = document.getElementById('txtURL').value;

    if ( !ePreview )
        return ;

    while ( ePreview.firstChild )
        ePreview.removeChild( ePreview.firstChild ) ;

    if ( GetE('txtURL').value.length == 0 )
        ePreview.innerHTML = ' ' ;   
    else
    {
        var oDoc = ePreview.ownerDocument || ePreview.document ;
        var newDiv = oDoc.createElement( 'div' ) ;
       
        var s ='';
        s+= '<script type="text/javascript" src="/Portals/0/Misc/flashembed.min.js"></script><script>\n';
        s+= ' flashembed("video",\n';
        s+= ' {\n';
        s+= ' src:"/Portals/0/Misc/FlowPlayerLight.swf",\n';
        s+= ' width: 320,\n';
        s+= ' height: 240\n';
        s+= ' },\n';
        s+= ' {config: {\n';
        s+= '  autoPlay: true,\n';
        s+= '  loop: true,\n';
        s+= '  autoBuffering: true,\n';
        s+= '  initialScale: "fit",\n';
        s+= '  videoFile: "' + thisUrl + '"\n';
        s+= '  }}\n';
        s+= ' );\n';
        s+= '</script>\n\n';
       
        s+= '<div id="page" align="center">\n'
        s+= '<div id="video"></div>\n';
        s+= '</div>';

        newDiv.innerHTML = s;
        ePreview.appendChild(newDiv);
    }
}

This works great in Firefox, but nothing happens in IE.  After doing some research, I discovered that IE doesn't play well with innerHTML.  I've yet to find an equivalent way of doing the same thing that works in IE.  I saw a post on a forum that suggested using appendChild with a textNode, but all that does is display the text of the script in the preview area without executing the script.  Please, does anyone know how I can accomplish this so that I can get back on a regular sleep schedule?

Thanks in advance!!

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorHelp with plugin - sending dynamic script to html documentHelp with plugin - sending dynamic script to html document


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out