2012-01-21 37 views
0

我在我的頁面中的JS功能,當頁面負載,我SFW加載內容normaly,我已經加入了ButtonClienClick叫我JS功能,以顯示包含我的SWF股利內容,但是當按鈕點擊被觸發時,我的swf不會加載。在點擊按鈕時加載此內容的任何消息?加載SWF內容的js的Clik

function ShowDialogLoading() 
    { 
     $('#example').flash(
      { 
       src: 'Img/banner_aguarde.swf', 
       width: 902, 
       height: 320 
      } 
     ); 
     $("#example").dialog({ 
      create: function (event, ui) { 
       $(".ui-widget-header").hide(); 
       $(".ui-dialog-content").css("padding","0px"); 
      }, 
      modal: true, 
      title: 'Pagamento Pré-Pago', 
      resizable: false, 
      draggable: false, 
      width: 'auto', 
      height: 'auto' 
     });      
    } 


<asp:Button ID="btnProximoPasso" CssClass="form-button" OnClientClick="ShowDialogLoading()" runat="server" Text="Próximo Passo" 
          OnClick="btnProximoPasso_Click" /> 

回答

1

試試這個

<html> 
<head> 
<script src="http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js"></script> 
</head> 
<body> 
<script> 

// use the jQuery alternative for flashembed.domReady 
$(function() { 

    // bind an onClick event for this second Flash container 
    $("#flash2").click(function() { 

     // same as in previous example 
     $(this).flashembed("/swf/flash10.swf"); 
    }); 
}); 
</script> 
<asp:Button ID="flash2" runat="server" Text="Load"/> 
</body> 
<html>