OK this must be really simple, because I am not seeing anyone else with this problem:
I have a dropdown list that is dynamically generated from a database. I am trying to pass the value of the selected item on the URL, but the URL will only pass the value of the first item on the list. Can somebody tell me what I am missing? Is there a better way of passing the parameters without the URL?
Code:
------------Form Action----------------
<cfform action="Policy_Details.cfm?PolicyID=#qGetPolicy.PolicyID#" method="post">
-----------Select list----------------
<cfselect name="Policy_List">
<cfoutput query="qGetPolicy">
<option value="#qGetPolicy.PolicyID#" name="PolicyID">#qGetPolicy.Name#</option>
</cfoutput>
</cfselect>
-------------Action Page Query----------------
<CFQUERY NAME="qGet_Policy_Details" DATASOURCE="Database">
SELECT ClientID, PolicyID
FROM Policy
WHERE (PolicyID=#URL.PolicyID#)
</CFQUERY>
Thanks in advance!
Kristine
Newbie, obviously;-)
I have a dropdown list that is dynamically generated from a database. I am trying to pass the value of the selected item on the URL, but the URL will only pass the value of the first item on the list. Can somebody tell me what I am missing? Is there a better way of passing the parameters without the URL?
Code:
------------Form Action----------------
<cfform action="Policy_Details.cfm?PolicyID=#qGetPolicy.PolicyID#" method="post">
-----------Select list----------------
<cfselect name="Policy_List">
<cfoutput query="qGetPolicy">
<option value="#qGetPolicy.PolicyID#" name="PolicyID">#qGetPolicy.Name#</option>
</cfoutput>
</cfselect>
-------------Action Page Query----------------
<CFQUERY NAME="qGet_Policy_Details" DATASOURCE="Database">
SELECT ClientID, PolicyID
FROM Policy
WHERE (PolicyID=#URL.PolicyID#)
</CFQUERY>
Thanks in advance!
Kristine
Newbie, obviously;-)