Hello all. Does anyone have a suggestion to make regarding the following 
quandary I find myself in?

I'm trying to submit a form from inside a javascript function thus:

function SubmitFmGenInfo145(action){
//form validation code (omitted here), then:
ColdFusion.Ajax.submitForm('fmGenInfo', 'saveGenInfo.cfm?mode=' + 
   action,GenInfoCallback(action,'145'));
}

When I do so, the callback function, shown below, executes correctly. It shows 
by the alert statements that it received the parameters, and by the state of 
the screen that it executed the populateGenInfo.cfm call (I haven't tested it 
for inserting yet). However, the form does not get submitted, and Firebug 
complains with the following error message: 'uncaught exception: 
ColdFusion.Ajax.submitForm: Form not found, form id: fmGenInfo'. 

function GenInfoCallback(mode,typegroup){
alert(mode); alert(typegroup);
ColdFusion.navigate('populateGenInfo.cfm','getGenInfo');
url = (typegroup == '145') ? 'populateTx.cfm' : 'populateTkdnOrApp.cfm';
if (mode == 'insert'){
  ColdFusion.navigate(url,'getTx');
  ColdFusion.navigate('populateSpecInstr.cfm?mode=no','getSpecInstr');
  }
}

However, the form most definitely does exist in the page, as Firebug's View 
Gererated Source makes clear. (Thank goodness Firebug has this ability; 
otherwise I could never be completely certain what the <cfdiv> contains!) 

Furthermore, when I do nothing but remove the reference to the callback 
function, changing the submitting function to the form shown below, Firebug 
does not complain, and the form submits flawlessly.

function SubmitFmGenInfo145(action){
//form validation code (omitted here), then:
ColdFusion.Ajax.submitForm('fmGenInfo', 'saveGenInfo.cfm?mode=' + action);
}

What could be going on here? Is one not supposed to send parms to a callback 
function? Or am I perhaps using the wrong syntax for doing so?

Thanks in advance for your ideas,
Peyton 



-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to