Autodesk 15606-011408-9300 Developer Guide - Page 149
whereClause2 variable date is generated on the server
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 149 highlights
Municipal Application Example Code (continued) if (temp == 'showAll') { var whereClause1 = "Status is not null"; } // If user selected any other drop-down item, assign // whereClause1 the string "Status=" plus the list item name // (i.e., "Status='New'" or "Status='Old'") else { var whereClause1 = "Status='" + temp + "'"; } // Assign array of possible drop-down list options // to selValue variable; then assign name of selected // list item to 'temp2' variable ('Selection' is the // HTML form, 'myDate' is the 'date:' drop-down list) var selValue = document.Selection.myDate.options; for (var i=0; i < selValue.length; i++) { if (selValue[i].selected) { var temp2 = selValue[i].value; } } // The temp2 variable now represents user's selection -- use // it to assign appropriate date-related SQL statement to the // whereClause2 variable (date is generated on the server // by Coldfusion, then sent to the browser as text) if (temp2 == 'today') { whereClause2 = "ReportDate = #04/01/99#" } else if (temp2 == 'last2days') { whereClause2 = "ReportDate = #03/30/99#" } else if (temp2 == 'last7days') { whereClause2 = "ReportDate = #03/25/99#" } else if (temp2 == 'last15days') { whereClause2 = "ReportDate = #03/17/99#" } else if (temp2 == 'last30days') Municipal Application | 149