[thelist] Hidden Fields
Palyne Gaenir
palyne at sciencehorizon.com
Thu Jul 13 00:51:58 CDT 2000
<tip type="cfml" level="armchair" reason="just for interest">
Nice post from Matt Walker on the ASP strings for hidden fields.
These small things really help beginners, I know. Out of general
interest to those thinking about dynamic coding (many wonder about
asp/cf) I thought I'd put the equivalent strings for ColdFusion.
> To get the value loaded into the hidden field, you would have to
> use some server-side script, e.g. (this is ASP)
<input type="hidden" name="CategoryID"
value="<%=Request.QueryString("CategoryID")%>">
Here's the CF for that:
(assume section/tag wrapped in <cfoutput></cfoutput>)
<input type="hidden" name="CategoryID"
value="#CategoryID#">
> The "Add your site" links would all be different, they'd pass a
> value in the query string (this could be hard-coded, but you would
> probably have some kind of dynamic system here):
<a href="Add.asp?CategoryID=34">Add your site</a>
Here's the CF:
<a href="Add.cfm?CategoryID=34">Add your site</a>
Actually as he mentioned, dynamic is usually better, e.g.:
<a href="Add.cfm?CategoryID=#CatID#">Add your site</a>
</tip> Palyne
More information about the thelist
mailing list