views:

12

answers:

0

I've used javascript to dynamically add an object element of type video/mpeg to a web page, but the plugin that is to play the video doesn't handle the new object.

Other possibly relevant details: The web browser in use is Opera for Linux Devices, I can connect to Opera Dragonfly and see the new object being added to the DOM as a new child of the <body> tag. If I create a web page that contains the object and load that page, it plays properly, it's only when I add it to the DOM after loading that it's not playing.

Any ideas what I can do to make the handler plugin see the object?

function pickContentResults() {
    if (request.readyState == 4) {
        if (request.status == 200) {
            /* Get the response from the server */
            var results = request.responseXML;
            if(results != "") {
                //alert(results);                 
                document.body.appendChild(results);
            } else {
                /* you might want to redirect to the guide again if it failed... */
            }
        } else {
            alert("Error! Request status is " + request.status);
        }
    }
}