我有一個以select開頭的表單。根據第一次選擇(選擇哪個報告)的選擇,我需要更改表單提交到的.cfm的操作路徑。有人請協助我如何做到這一點?我接受任何正確的方式,無論是HTML,ColdFusion或jQuery(Javascript)。選擇決定以哪種形式開始動作
所以有選擇開始:
<select class="form-control" id="reporttype" name="reporttype">
<option value="" selected="selected">Select Report</option>
<option id ="checklistreports" value="checklistreports" >Checklist Stats</option>
<option id ="locationreports" value="locationreports" >Location Stats</option>
</select>
如果#checklistreports
選擇的形式應該是
<form name="generatereport" method="post" action="_checklists_queries.cfm">
,但是如果選擇#locationreports
的形式應該是
<form name="generatereport" method="post" action="_location_queries.cfm">
任何幫助與此將不勝感激。
我想在CF中的IF語句中做,但它讓我卡住不幸的是沒有結果。
我有另一個選擇,要求打印PDF或Excel。這是否也是我嘗試創造的同一個地點? –