Monday, March 23, 2009

CFDIV CFFORM and Asynchronous submitting

When you submit a form inside a cfdiv it submits without refreshing the whole page, only the cfdiv. This was working great unless I hit submit a second time while but you can use ColdFusion.navigate to fix this.

onclick="ColdFusion.navigate('#event.linkto('admin.countyupdate')#','countydiv','mycallBack','myerrorHandler','POST','countyform')"

Putting this in the onclick event of the cfform button fixed the issue. I had a hard time for a while because I didn't need the mycallback and myerrorhandler arguments, but putting empty quotes worked. I know, I should probably define them.

No comments: