8 Replies Latest reply on May 19, 2006 3:09 PM by Abram Adams

    If structure??? confusin

    PackinDaMAC Level 1
      Hello to all.....I have a few questions about how to structure my <cfif> </cfif> tags...I have a <select> and i named it "vider" and i have an <input type= text> and the control name is "loca".....Now the values that are in my select are data values that i pull from my SQL tables and i am wondering how can i check for certain text in the <select></select>...this is what i have so far...




      <html>
      <head>
      <title>EMOI Electronic Fee Slip</title>
      <meta https-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <script language="javascript" src="../../choosedate.js"></script>
      <link type="text/css" rel="stylesheet" href="../../calendar.css">
      <link href="../style.css" rel="stylesheet" type="text/css">
      </head>

      <body>


      <cfset tdate = DayOfWeek(Now())>
      <cfif IsDefined("ydate")>
      <cfif IsDefined("vider")>

      <cfif FORM.vider IS "Mr. Me Too">
      <cfif tdate IS 1>

      <cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
      <cfset loca = "Surgery">
      </cfif>
      </cfif>
      </cfif>

      <cfelseif tdate IS 2>
      <cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
      <cfset loca = "to this">
      <cfelseif tdate IS 3>
      <cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
      <cfset loca = "Something">
      <cfelseIf tdate IS 4>
      <cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
      <cfset loca = "Something 3">
      <cfelseif tdate IS 5>
      <cfset ydate = DateFormat(DateAdd("d", +4, Now ()), "MM/DD/YYYY")>
      <cfset loca = "Something 4">

      <cfelseif tdate IS 6>
      <cfset ydate = DateFormat(DateAdd("d", +4, Now ()), "MM/DD/YYYY")>
      <cfset loca = "Something 5">

      <cfelse>
      <cfset ydate = DateFormat(DateAdd("d", +2, Now()), "MM/DD/YYYY")>
      </cfif>





      <cfquery datasource="bashful_emoi" name="res">
      Select * From Patients where doc_code ='RA' and date_seen LIKE '%#ydate#' Order By last_name ASC
      </cfquery>

      <br>
      <br>

      <table border=0 cellspacing=0 cellpadding="4px" align="center" height="1" bordercolor="#3399FF" >

      <tr>
      <td height="15px" background="topline.gif" class="lefttopbottom"><b><center>Name</center></b></td>
      <td height="15px" background="topline.gif" class="topbottom"><b><center>Appointment Date</center></b></td>
      <td height="15px" background="topline.gif" class="toprightbottom"><b><center>Provider</center></b></td>
      <td height="15px" background="topline.gif" class="toprightbottom"><b><center>Location</center></b></td>
      </tr>

      <cfoutput query="res">
      <tr>
      <td class="leftrightbottom">#res.last_name#,#res.first_name#</td>
      <td align="center" class="rightbottom">#res.date_seen#</td>
      <td aligm="center" class="rightbottom"><select name="vider"><option>#res.provider#</option></select></td>
      <td align="center" class="rightbottom"><input type="text" size="20" name="location" value="#loca#"></td>
      </tr>
      </cfoutput>


      </table>





      <br>
      <Center>
      <table>
      <tr>
      <td>

      <input type="submit" value="Call People" border="1" width="300 x" align="bottom"style="font-size:10pt;width:100px;height:30px">
      </td>
      </tr>
      </center>
      </table>

      </table>

      </body>
      </html>