1

i am displaying videos in my popup window on selection of the video link. The video is playing well. But after closing the popup and when i try to play another video, it tends to play the previous video in the top and below the newly clicked video link is being played.

is there a way to solve this issue?

2 Answers2

0

Try this if and only if you are populating the video in the div dynamically.

function popup() { 
$('#display_videos').css("display", "block"); 
$('#display_videos').dialog({ 
buttons: [{ text: 'Close', handler: function() {       
$('#display_videos').html('')  ;
$('#display_videos').dialog('close');
} 
}] 
});
 }
Rohit Arora
  • 2,246
  • 2
  • 24
  • 40
0
 function GetVideo(VideoId) {
        var id = VideoId;
// videoid is the id of the video selected by clicking on the link.
        $.ajax
    ({
         type: "POST",
         url: "KtVideosDocs.aspx/Play_Videos_Kt",
         data: "{'VideoId': '" + VideoId + "'}",
         contentType: "application/json",
         dataType: "json",
         success: function(xyz) {
             var tabledata = [];
             var data = jQuery.parseJSON(xyz.d);
            var FileName = data[0].FileName;

$('#tblplayvideos tbody>tr:last').after(''); }, error: function(x, e) { alert(x.responseText); }

     });
    }
this function takes the video selected and plays it