Some code I played with demonstrating the idea.
Index.cfm
---------
<cfsilent>
<cfif isDefined("form.id")>
<cfset ID_result = "I did something with the ID">
</cfif>
<cfparam name="form.text" default="">
<cfparam name="form.ID" default="">
<cfparam name="ID_result" default=" ">
</cfsilent><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Basic Form</title>
<script type="text/javascript">
function processID(id)
{
var formObj = document.getElementById("aForm");
formObj.action="index.cfm";
formObj.submit();
}
</script>
</head>
<body>
<cfoutput>
<h1>#id_result#
<form id="aForm" action="formDump.cfm" method="post">
<input type="text" name="TEXT" value="#form.text#" />
<select name="ID"
onchange="processID(this.options[this.selectedIndex].value);">
<option value="1" #iif(form.ID EQ
1,DE('selected'),DE(''))#>1</option>
<option value="2" #iif(form.ID EQ
2,DE('selected'),DE(''))#>2</option>
</select>
<input type="submit" />
</form>
</cfoutput>
</body>
</html>
formdump.cfm
------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Form Dump</title>
</head>
<body>
<cfdump var="#form#">
<a href="index.cfm">link</a>
</body>
</html>
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
---------
| 1 | |
--------- Binary Soduko
| | |
---------
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257284
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4