0 Replies Latest reply on Apr 30, 2009 9:59 PM by newchickinCF

    ajaxcfc with jquery

    newchickinCF Level 1

      Hi Guys.

       

      I have one jquery function in which i want to load the contents dyanmically without refresh. I defined some ajaxcfc stuff as i am noob in this ajaxcfc.

       

      can u please guide me that if i am doing wrong or right.

       

      my ajax stuff:

       

      Please see if my ajaxcfc stuff is wrong, can anybody correct it

      <script type="text/javascript" src="branches/jquery/core/js/jquery.js"></script>

      <script type="text/javascript" src="branches/jquery/core/js/jquery.AjaxCFC.js"></script>

      <script type="text/javascript">

      $.AjaxCFC({require:'json'}); // make sure json.cfc file is in same folder as your auth.cfc and ajax.cfc components!!! json.cfc comes in AjaxCFC package

      $.AjaxCFCHelper.setDebug(false);

      $.AjaxCFCHelper.setUseDefaultErrorHandler(true);

      $.AjaxCFCHelper.setSerialization('json');

      submitresults = function() {

      loadresults();

      return false;

      };

      loadresults = function(data){

      $("#showme").html(data).show();

      };

      <div id="showme" style="display:none;width:90%;hight:auto;overflow:visible;">

      Content goes here

      </div>

      submitresults is the onSubmit = return submitresults(); in the <form> tag

      will that my above code will load contents without refresh.