1 Reply Latest reply on Oct 22, 2007 11:55 AM by chazman113

    Refreshing a CFLAYOUT tab after async form submit help

      I am using the CFLAYOUT tab structure to create an ajax style app. All the async form submits work great but a few forms I want to reload the tab (set to reload on click) simply because the display will be different. I've tried several ways to use the Coldfusion.navigate() function but can't seem to get it right. (This app uses fusebox5)

      ************ SUBMIT BUTTON******************
      <cfinput name="submitAjax2" type="button" value="TEST UPDATE"
      onclick="ajaxSubmit('editEmployees', '#myself##xfa.updateEmployees#', '#myself#pl_admin.adminHome&pipelineID=#attributes.pipelineID#', 'tab7')">

      *********** JAVASCRIPT **********************
      function ajaxSubmit(formName, formAction, reloadURL, reloadObject) {
      ColdFusion.Ajax.submitForm(formName, formAction, callback, errorHandler, 'POST', 'false');
      if (reloadURL && reloadObject) {
      Coldfusion.navigate(reloadURL, reloadObject);

      ************** CFLAYOUT ************************
      <cflayoutarea title="<div style='font-size:16px; width:100px;'><img src='tl_icons/24x24/gears.png' border='0' hspace='4' align='absmiddle' /> Admin</div>"
      style="padding:5px 5px 5px 5px;" overflow="visible" name="tab7"
      source="#myself#pl_admin.adminHome&pipelineID=#ATTRIBUTES.pipelineID#" refreshonactivate="yes">
        • 1. Re: Refreshing a CFLAYOUT tab after async form submit help
          chazman113 Level 1
          The correct syntax for me was

          ColdFusion.navigate('#myself#pl_notes.home&pipelineID=#attributes.pipelineID#', 'tab2');

          The only problem I have now is, if I simply run this code after an ajax form submit, it refreshes before the update is made, I need to figure out a way to pass this code (or in some cases not pass it) to the callback function. It only takes one argument, is there a way to hide it in the html (or a better way) to pass additional data to the callback function?