views:

29

answers:

0

Kindly i want anybody to tell me what am i supposed to do to let this work

I have a lot of .mpg videos on my server and i show their names in .aspx page through Gridview ,which has a column hold a link for watching and another one for downloading ..the one which used to watch the video has a HTML code

"<a href='WatchVideo.htm?fileName="+selectedVideo+"' target='_blank'>"+textLabel.Text+"</a>"

the HTML page code is something like that

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/mhstyle.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>

<script>

function getQueryString()
{
   var fullURL = parent.document.URL;
   var fileName = fullURL.substring(fullURL.indexOf('?')+10, fullURL.length);
   var VideoContent = "<object id='MediaPlayer1' width='300' height='300' "+
                        "classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'"+
                        "codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'"+ 
                        "standby='Loading Microsoft® Windows® Media Player components...'"+ 
                        "type='application/x-oleobject'"+
                        "align='middle'>"+
                        "<param name='FileName' value="+fileName +">"+
                        "<param name='ShowStatusBar' value='True'>"+
                        "<param name='DefaultFrame' value='mainFrame'>"+
                        "<param name='autostart' value='false'>"+ 
                        "<embed type='application/x-mplayer2'"+ 
                        "pluginspage = 'http://www.microsoft.com/Windows/MediaPlayer/'"+ 
                        "src="+fileName+
                        " autostart='false'" +
                        "align='middle'"+ 
                        "width='300'"+ 
                        "height='300'"+ 
                        "defaultframe='rightFrame'"+ 
                        "showstatusbar='true'>"+
                        "</embed>"+
                    "</object>";

 document.getElementById("Video").innerHTML = VideoContent;
}
</script>
</head>

<body onload= "getQueryString()">
<table width="912" border="0" align="center" class="container">
  <tr>
    <td width="904">
        <div class="header" style="text-align: center">
        <div id="Video">
        </div>
    </div>
    </td>
  </tr>
</table>
</body>
</html>

the video just appears as a black area , although when i set the HTML page code like that it works fine

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
</head>
<body>
<table width="912" border="0" align="center" class="container">
  <tr>
    <td width="904">

        <div class="header" style="text-align: center">
        <div id="Video">
        <object id='MediaPlayer1' width='300' height='300'
                        classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'
                        codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' 
                        standby='Loading Microsoft® Windows® Media Player components...' 
                        type='application/x-oleobject'
                        align='middle'>
                        <param name='FileName' value='Video-Albums/Development%20Room/MOV00211.MPG'>
                        <param name='ShowStatusBar' value='True'>
                        <param name='DefaultFrame' value='mainFrame'>
                        <param name='autostart' value='false'>
                        <embed type='application/x-mplayer2'
                        pluginspage = 'http://www.microsoft.com/Windows/MediaPlayer/' 
                        src='Video-Albums/Development%20Room/MOV00211.MPG'
                        autostart='false'
                        align='middle' 
                        width='300'
                        height='300'
                        defaultframe='rightFrame'
                        showstatusbar='true'>
                        </embed>
                    </object>
        </div>
    </div>
    </td>
  </tr>
</table>
</body>
</html>

Thanks in advance .