I have a question about arguments that are passed with ajax in coldfusion. So I have three arguments that I'm passing date1, date2 and meetingDate. I have to compare three of these arguments and return the string based on the dates. Here is my logic:
<cfset sigDate1 = dateFormat(trim(arguments.date1),'yyyy/mm/dd')>
<cfset sigDate2 = dateFormat(trim(arguments.date2),'yyyy/mm/dd')>
<cfset meetDate = dateFormat(URLDecode(arguments.meetingDate),'yyyy/mm/dd')>
<cfelseif (sigDate1 LT meetDate) OR (sigDate2 LT meetDate)>
<cfset myResult = "blockDate">
<cfelse>
My current code has one problem, if I just pass one of these two dates(date1 or date2) I will always get "blockDate" returned with my ajax function. I detected the problem and if I just pass date1 but not date2 my elseif still will be executed no matter what. So I was trying to fix this problem with using one extra cfif and check if my date1 and date2 isDefined but that did not fix the problem. If anyone have any idea how to fix this bugg please let me know.
Thanks in advance.
yourFunctionName( date1, meetingDate)OR simply passing in an empty valueyourFunctionName( date1, "", meetingDate)? - Leightype="date"in your cfargument tag. - Dan Bracuk