Hi,
So far I've been really impressed with Flowplayer, it's a great tool.
However, I'm having a problem with it loading via AJAX. Specifically, I'm using the jQuery plugin jqModal to generate a modal window. The jqModal call retrieves the modal window content via its AJAX method -- the call to Flowplayer is in that retrieved content.
The first time I click the link in the default.php page to generate the modal window, both the AJAX text content and Flowplayer appear fine. However, after I close the modal window, subsequent clicks on the link bring up the modal window w/the AJAX text content, but no Flowplayer.
I'm a novice coder, but my guess is that this has something to do with event binding/delegation on the call to Flowplayer. I've searched through the forums for 'jqModal' and 'ajax' but didn't find a response that related to my issue.
Here is the relevant code:
1. default.php (the pre-existing page, which includes external script links to the jQuery, jqModal, Flowplayer and ajaxtest js files)
2. ajax.php (the remotely loaded content)
3. ajaxtest.js
Any help is much appreciated!
Cheers,
Jeff
So far I've been really impressed with Flowplayer, it's a great tool.
However, I'm having a problem with it loading via AJAX. Specifically, I'm using the jQuery plugin jqModal to generate a modal window. The jqModal call retrieves the modal window content via its AJAX method -- the call to Flowplayer is in that retrieved content.
The first time I click the link in the default.php page to generate the modal window, both the AJAX text content and Flowplayer appear fine. However, after I close the modal window, subsequent clicks on the link bring up the modal window w/the AJAX text content, but no Flowplayer.
I'm a novice coder, but my guess is that this has something to do with event binding/delegation on the call to Flowplayer. I've searched through the forums for 'jqModal' and 'ajax' but didn't find a response that related to my issue.
Here is the relevant code:
1. default.php (the pre-existing page, which includes external script links to the jQuery, jqModal, Flowplayer and ajaxtest js files)
<body>
<a href="#" class="jqModal">Click here for AJAX</a>
<div id="ajax" class="jqmWindow">
</div>
</body>
2. ajax.php (the remotely loaded content)
<a href="#" class="jqmClose">Close</a>
<br />
<h2 class="centered">AJAX works!</h2>
<a id="player" class="flowplayer" href="video/test.flv"></a>
3. ajaxtest.js
var loadFlowplayer = function() {
$("#player").flowplayer("/swf/flowplayer-3.0.2.swf");
}
$(document).ready(function() {
$("#ajax").jqm({ajax: 'ajax.php', onLoad: loadFlowplayer});
});
Any help is much appreciated!
Cheers,
Jeff