<script type="text/javascript">
function play(media){
document.getElementById('mediaplayer').innerHTML=
'<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"'
'type="application/x-oleobject" width="320" height="285">'
'<param name="showControls" value="false">'
'<param name="fileName" value="' media '">'
'<embed type="application/x-mplayer2" width="320" height="285"'
'showcontrols="false" src="' media '"><\/embed><\/object>'
}
</script>


<div id="mediaplayer"></div>
<ul id="menu">
<li><a onclick="play(this.href);return false" href="">Source 1</a></li>
<li><a onclick="play(this.href);return false" href="">Source 2</a></li>
<li><a onclick="play(this.href);return false" href="">Source 3</a></li>
</ul>

I have put back the tags for your convinience

when I run this code and script on my PC everthink i ok and I am able to run the videos on my web page with windows media player embedded but as soon I tranfer my file to a remote web server so that my web page can work but when I click on the video link nothink plays. Kindly help

Recommended Answers

All 2 Replies

Two things - your closing tags perhaps should be </embed> and </object>
and
you might simply have relative href values so the videos are found when on your local machine, but aren't there when on remote server. Can't tell this because you've left them empty here.

Two things - your closing tags perhaps should be </embed> and </object>
and
you might simply have relative href values so the videos are found when on your local machine, but aren't there when on remote server. Can't tell this because you've left them empty here.

Thanks for your reply. No I have following in the href="http://www.inconversationskz.com/afghan.avi
Kindly help. As I am really fed up
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.