coldfusion flash integration:
I have been trying to adapt parts of the Real Estate example (not the Flash Remoting part yet) to a Flash form that includes an onClick event attached to a cfinput. <cfformgroup type="vertical" label="Account Step:"> <cfinput type="text" readonly="yes" value="#URL.IN_account_no#" name="ACCOUNT_NO" label="Account Number" size="9"> <cfinput type="datefield" readonly="yes" value="#URL.IN_STARTDATE#" name="STARTDATE" label="Start Date" size="10"> <cfinput type="datefield" readonly="no" value="#URL.IN_ENDDATE#" name="ENDDATE" label="End Date" size="10"> <cfformgroup type ="horizontal" label="Responsible Party"> <cfinput type="Radio" name="Select_responsible" VALUE="APPLICANT"> <cfinput type="Radio" name="Select_responsible" VALUE="MEA"> <cfinput type="Radio" name="Select_responsible" VALUE="STAFF"> </cfformgroup> <cfselect name = "Select_remark" query = "remarksRet" label = "Select a Task" display = "REMARKS" Value = "REMARKS" required = "Yes" Selected = ""> </cfselect> <cftextarea readonly="no" value="#URL.IN_COMMENTS#" name="COMMENTS" label="Comments" height="100" width="400" maxlength="255" /> <cfformgroup type ="horizontal"> <cfinput type="button" name="Submit" VALUE="Save" onClick="Update_step()"> </cfformgroup> </cfformgroup> I place Update_step() in a cfformitem. <cfformitem type="script"> function Update_step() { var varsuccess = "No"; var updateArguments = {}; updateArguments.in_account_no = ACCOUNT_NO.text; updateArguments.in_startdate = dateFormat(STARTDATE.text); updateArguments.in_enddate = dateFormat(ENDDATE.text); updateArguments.in_responsible = Select_responsible.selectedData; updateArguments.in_remarks = Select_remark.selectedItem.data; updateArguments.in_comments = COMMENTS.text; varsuccess = application.Mycaselist.Update_account_step(); return varsuccess; } function dateFormat(sDate:String):String { var sYear = substring(sDate,7,4); var nMonth = Number(substring(sDate,1,2)); var sDay = substring(sDate,4,2); var abbrevMonth:Array = ["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]; return (sDay+"-"+abbrevMonth[nMonth-1]+"-"+sYear); } </cfformitem> Update_step() does not "see" my cfinput controls, or I am not passing them correctly. Should I use cfsavecontent instead? Alton
Try and set function Update_step() to be
Making the function worked. Also I had to make a number of changes to make the flash remoting work--like recognizing that I had to restart the Coldfusion service every time I changed one of the in-memory CFCs. Thank you.
Don't see what you're looking for? Try a search.
|