| Form values - struct | |
|---|---|
| MYSELECT | 0 |
Select menu created using this CFMODULE:
<cfparam name="attributes.fieldName" type="string" default="foo" />
<cfparam name="attributes.selectedValue" type="string" default="" />
<cfoutput>
<select id="#attributes.fieldName#" name="#attributes.fieldName#">
<option value="">-- Select --</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
<script type="text/javascript">
$('###attributes.fieldName#').val('#attributes.selectedValue#');
</script>
</cfoutput>
The last thing this CFMODULE does is write out a line of jQuery that selects the requested option.