0 Replies Latest reply on Apr 4, 2011 10:03 AM by TiGGi

    Ajax.submitForm result to a target div

    TiGGi Level 1


      I am trying to use  ajax.submitForm with multiple forms on the page.  Submiting the forms works fine but what I am strugling with is getting callback to show in different div's.  So each from has it's own result div where I want response to show.


      So how can I pass an ID to the callback function through the form submition or even result response?



          function doSaveAlt(nForm) {
              ColdFusion.Ajax.submitForm(nForm, '/task/form/process.cfm', callback, errorHandler);
          function callback(text)
          resultDiv = 'resultText_' & ID ;
          document.getElementById(resultDiv).innerHTML = text;