JQuery Dialog not displaying buttons -


i'm initializing dialog box in document.ready() function put ok button doesn't render on page. straight forward thing, not sure what's going on.

$(document).ready(function(){ //var popupwindow = window.open('p360tradingvideos.asp','p360tradingvideos','height=400,width=510,status=no,toolbar=no,menubar=no,resizable=no,location=no,scrollbars=no');  $("#videoplayerdiv").dialog({     position: "center",     resizable: true,     autoresize: true,     draggable: false,        modal: true,     buttons: {         "ok": function(){             $(this).dialog("close");         }     } });  }) 

and here div

<div id="videoplayerdiv">     <div id="videotable">         <table>             <tr>                 <td><b>trading videos</b></td>             </tr>             <tr>                 <td>--></td><td><a href="#" onclick="playvideo('tradingoverview');">trading overview</a></td>             </tr>             <tr>                 <td>--></td><td><a href="#" onclick="playvideo('multiaccount');">multi-account trading wizard</a></td>             </tr>             <tr>                 <td>--></td><td><a href="#" onclick="playvideo('globalunlock');">global unlock</a></td>             </tr>         </table>     </div>     <div id="videoplayer" style="display:none; height: 250px; width: 250px;">      </div> </div> 

the dialog pops correctly on page load, doesn't display ok button. also, here 2 functions have written populate videoplayer div in case might causing issue, not familiar dialog structure. help

function playvideo(x){     $("#videotable").attr("style","display:none;");     $("#videoplayer").attr("style","display:block;");     $("#videoplayer").html("");      var videotoplay = x;     switch(videotoplay){         case 'tradingoverview':             //alert(videotoplay);             var newelement = "<object id='objviewer' width='250' height='250' type='video/x-ms-asf' data='wildlife.wmv' classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6'><param name='url' value='wildlife.wmv'><param name='filename' value='wildlife.wmv'><param name='autostart' value='0'><param name='uimode' value='full'><param name='autosize' value='1'><param name='playcount' value='1'><embed type='application/x-mplayer2' src='wildlife.wmv' name='mediaplayer' id='wmvviewer' autostart='false' width='250' height='250' showcontrols='1' showstatusbar='0' showdisplay='0'></embed></object><br/><a onclick='returnvideos();'>return videos</a>";             $("#videoplayer").html(newelement);         break;         case 'multiaccount':             //alert(videotoplay);             var newelement = "<object id='objviewer' width='250' height='250' type='video/x-ms-asf' data='babyboymainbackground.wmv' classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6'><param name='url' value='babyboymainbackground.wmv'><param name='filename' value='babyboymainbackground.wmv'><param name='autostart' value='0'><param name='uimode' value='full'><param name='autosize' value='1'><param name='playcount' value='1'><embed type='application/x-mplayer2' src='babyboymainbackground.wmv' name='mediaplayer' id='wmvviewer' autostart='false' width='250' height='250' showcontrols='1' showstatusbar='0' showdisplay='0'></embed></object><br/><a onclick='returnvideos();'>return videos</a>";             $("#videoplayer").html(newelement);         break;         case 'globalunlock':                     var newelement = "<object id='objviewer' width='250' height='250' type='video/x-ms-asf' data='panel_mask.wmv' classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6'><param name='url' value='panel_mask.wmv'><param name='filename' value='panel_mask.wmv'><param name='autostart' value='0'><param name='uimode' value='full'><param name='autosize' value='1'><param name='playcount' value='1'><embed type='application/x-mplayer2' src='panel_mask.wmv' name='mediaplayer' id='wmvviewer' autostart='false' width='250' height='250' showcontrols='1' showstatusbar='0' showdisplay='0'></embed></object><br/><a onclick='returnvideos();'>return videos</a>";             $("#videoplayer").html(newelement);             //alert(videotoplay);         break;     } } function returnvideos(){     $("#videotable").attr("style","display:block;");     $("#videoplayer").attr("style","display:none;"); } 

demo:

http://jsfiddle.net/h5zkb/

<div> copied code , button "ok" showing up.  </div>  

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -