Invoke ColdFusion function using AJAX

前端 未结 6 750
Happy的楠姐
Happy的楠姐 2020-12-01 16:58

I need to invoke a ColdFusion function(present in a .cfm file) when the user clicks on a link. And I would like to do it using jQuery. I have a jQuery snippet which looks li

6条回答
  •  误落风尘
    2020-12-01 17:29

    Just saw this post. I am using a cfc and jquery ajax to display bunch of calculated values. My cfc has the following:

    
    
        this.init();
    
         
           
             
         
         
             
             
               
             #arguments.salesPrice# 
             
         
     
    

    I use JQuery.ajax:

      $.ajax({
          type:"POST",
          url:"financeTerms.cfc?method=getFinanceTerms",
          data: "sales_price=55000&interestRate=5.99",
          cache:false,
          success: function(msg) {
          $("#someDiv").html(msg);
          }
      });
    

    Perhaps, it will be useful to somebody else...

提交回复
热议问题