jQuery在一个被调用的模态中

时间:2013-03-10 14:01:40

标签: jquery coldfusion coldfusion-9

我有一个脚本,我调用一个由另一个.cfm页面组成的模态窗口。我的问题是:当脚本调用时.cfm是来自.cfm识别的父页面的jQuery脚本?似乎我从jQuery获得零响应。这是.cfm中的代码:

<head>

<script>
$(document).ready(function(){
 $(".delete-asset").click(function(){
   var delete_id = $(this).attr('id');
   $.ajax({
      type:'GET',
      url:'cfc/Assets.cfc?method=DeleteAsset&returnformat=json',
      dataType: "json",
      data: {
          argdelete_id: delete_id.val(),
        },
      success:function(data) {
        if(data) {   // DO SOMETHING
        } else { // DO SOMETHING }
      }
    }
   });
 });
});
</script>

<cfparam name="url.uid" default="">

        <cfquery name="qPics">
        SELECT aq.Thumbs, aq.photos, aq.notes, a.assetID
        FROM tblAssetAssign a 
        INNER JOIN tblAssets aq ON aq.ID = a.Asset
        WHERE a.AssetItem = <cfqueryparam cfsqltype="cf_sql_varchar" value="#URL.uID#">                
        </cfquery>

</head>

<body>
     <div class="grid_6">
        <cfoutput query="qPics">
           <div class="block-pics">
               <img src="#site.URL#images/thumbs/#thumbs#" />
               <div class="note">#notes#</div>
               <div class="block-pics-remove"><a class="delete-asset" id="#assetID#"><img src="#site.URL#/assets/images/remove.png"></a></div>
           </div>
        </cfoutput>
    </div>
</body>

我正在使用jQuery-1.9.1.js&amp; ColdFusion 9

0 个答案:

没有答案