twitter bootstrap bind选择输入

时间:2013-07-15 14:41:12

标签: twitter-bootstrap coldfusion

我对Bootstrap的术语感到困惑。我正在创建一个页面,我从select中选择一个“专业”,我想将该选择绑定到以前的CFDIV,但我不能再使用它了。如果用户选择Fed / Gen作为专业,那么我想展示该组的所有子专业。

<div style="width:95">Specialty:
  <select enabled="Yes" name="specialty" multiple="no" required="Yes" message="Specialty is Required.">
     <option value = "1" <cfif QUser.specialty EQ "1">selected</cfif>>Fed / Gen</option>
     <option value = "2" <cfif QUser.specialty EQ "2">selected</cfif>>State & Local</option>
     <option value = "3" <cfif QUser.specialty EQ "3">selected</cfif>>International</option>
     <option value = "5" <cfif QUser.specialty EQ "5">selected</cfif>>Human Resource</option>
     <option value = "6" <cfif QUser.specialty EQ "6">selected</cfif>>Other</option>
  </select></td>

</div>    
<div>
    Sub Specialties
</div>
<!---             <cfdiv id="subspecDiv" bind="url:panels/panel1_5_1.cfm?indivnum=#indivnum#&specialty_select={specialty}" /> --->
<cfif url.specialty_select neq "">
<cfif url.specialty_select NEQ "0">
    <table width="100%">  
       <cfquery name="subSpecList" datasource="#request.dsn#">
            SELECT *
            FROM Subspecialty
            WHERE specialtyID = #url.specialty_select#
            <cfif url.specialty_select EQ '3'>
            ORDER by sequence
            </cfif>
       </cfquery>

       <cfset variables.newrow = true>
       <tr>
         <cfoutput query="subSpecList">       
    <cfquery name="subSpecCheck" datasource="#request.dsn#">
               SELECT * 
           FROM users_subspecialty
           WHERE 0=0
           <cfif indivnum NEQ "">
            AND UserID = <cfqueryparam value="#indivNum#" cfsqltype="CF_SQL_NUMERIC" maxlength="10"/>
           </cfif>
           AND subspecialtyid = #subspecialtyid#
        </cfquery>              

            <cfif variables.newrow EQ true>
                <tr> 
            </cfif>
            <td align="left" width="50%">
                    <table cellpadding="0" cellspacing="0">
              <tr>
                        <td style="width:60"><input type="text" name="subspec_#subspecialtyid#" size="2" <cfif subSpecCheck.percentage gt "0">value="#subSpecCheck.percentage#" </cfif> onChange="javascript: experienceUpdateDate();" /> %</td>
                        <td style="width:5">
                <input type="text" name="subspecABC_#subspecialtyid#" value="#subSpecCheck.ABC#" size="1" maxlength="1" onChange="javascript: experienceUpdateDate();" /></td>
                          <td style="width:140">&nbsp;#title#</td>
                     </tr>
                   </table>
                    </td>
                <cfif subSpecList.currentRow MOD 2 EQ 0>
                    </tr>
                    <cfset variables.newrow = true>
                    <cfelse>
                    <cfset variables.newrow = false>
                    </cfif>

          </cfoutput>
      </tr>
      </table>
 </cfif>               
</cfif>

0 个答案:

没有答案