0

この関数を実行するために必要なすべての.jsファイルと UI ファイルをインポートしました... Google CDN を使用してこのコードを実行すると、正常に動作します。しかし、プロジェクト内の .js ファイルと同じ CDN ファイルを使用して実行しようとすると、エラーがスローされますcancel is not a function..

 $( "#dialog-form" ).dialog({
      autoOpen: false,
      height: 250,
      width: 350,
      modal: true,        

      buttons: {
          "Buy Now": function() {         
              $( this ).dialog( "close" );        
              var folionumber=$("#folionum").val();
              //---------------code change--------
              var firsturl = "https://www.sbimf.com/INVESTORCENTER/ASPX/frmNew_Purchase.aspx?id=";
              var id=1;
              var calledfrom = "&calledfrom=asset&fol_no=" + folionumber + "&chk_digit=&opt=B&SchemeCode=" + schemecode + "&url=" + encurl;

              var finalurl=firsturl+id+calledfrom;

              // alert(finalurl);
              window.open(finalurl, "_parent");      
              // window.open("http://172.24.10.203/INVESTORCENTER/ASPX/frmNew_Purchase.aspx?id=1&calledfrom=PortFolio&fol_no=13627577&chk_digit=&opt=B&SchemeCode=D018");    
          },
          Cancel: function() {
              $( this ).dialog( "close" );
          }
      },    

      open: function () {
          $(this).parents(".ui-dialog:first").addClass("dialog_style1");
          $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("titlebar");
          $(this).parents(".ui-dialog:first").find(".ui-dialog-buttonpane").addClass("dialog_style1");
          $(this).parents(".ui-dialog:first").find(".ui-dialog-buttonpane").find(".ui-dialog-buttonset").find(".ui-button").find(".ui-button-text").addClass("btncss");
          $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").find(".ui-dialog-titlebar-close").addClass("smallbutton"); 

      }
 });
4

1 に答える 1