Skip to main content
October 30, 2008
Answered

Post form to external cfdiv

  • October 30, 2008
  • 1 reply
  • 413 views
Hi,

I know all about forms submitting via ajax to the cfdiv they're in, and I also know how to submit a form to an external cfdiv (one outside the cfform) using a url binding (bind="url:..."). However, I now have a form that is likely to exceed the max length of a url using the latter method. Is there a way to POST the contents of a cfform to an external cfdiv?

Thanks,
Russ
This topic has been closed for replies.
Correct answer Newsgroup_User
ColdFusion.navigate() and ColdFusion.Ajax.submitForm() functions will
let you do it.

in ColdFusion.navigate() case you can provide an optional FORMID
attribute which will make the function submit the form with that ID to
specified URL and display results in specified container.

in ColdFusion.Ajax.submitForm() case you can write a js function which
will update your cfdiv and use that function in CallbackHandler argument
of ColdFusion.Ajax.submitForm().

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

1 reply

Newsgroup_UserCorrect answer
Inspiring
October 31, 2008
ColdFusion.navigate() and ColdFusion.Ajax.submitForm() functions will
let you do it.

in ColdFusion.navigate() case you can provide an optional FORMID
attribute which will make the function submit the form with that ID to
specified URL and display results in specified container.

in ColdFusion.Ajax.submitForm() case you can write a js function which
will update your cfdiv and use that function in CallbackHandler argument
of ColdFusion.Ajax.submitForm().

hth

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
October 31, 2008
Thanks, Azadi! It seems like I've been using ColdFusion.navigate in other ways forever, and yet never noticed you can post a form to an external container like that.