Hi,
I have the following code:
There will be as many hidden fields as the number of rows
retrieved by the query "getCities". Each is distinguished with the
value of level_detail_uid for each loop.
city.cfm
----------------
<html>
<head>
<title>Update </title>
<script language="JavaScript">
function delete_city(level_detail_uid,city_id ,cnam)
{
if ( confirm("Are you sure to delete the pricing-information
for " + city_id + " ?") )
{
window.location =
'city_pricing_display.cfm?delete_level_detail_uid=' +
level_detail_uid +
'&delete_city_name=' + city_id + '&del_cnam=' +
cnam;
}
}
<cfif isDefined("delete_level_detail_uid") and
delete_level_detail_uid is NOT "">
<cfoutput> #del_cnam#</cfoutput>
<cftransaction>
</cfquery>
</cfif>
</cftransaction>
</cfif>
<form method="POST" name="city_details"
action="city_update_pop.cfm">
<table border="0" cellspacing="0" cellpadding="0"
width="100%">
<tr>
<td>
<cfquery name="getCities"
datasource="#application.alcdatasource#">
SELECT city_name, dtl.level_detail_uid,
FROM alc_pricing_level_details dtl, alc_city c,
alc_detail_provider prvdr
WHERE level_desc_uid = #level_desc_uid#
AND dtl.level_detail = c.city_id(+)
AND prvdr.level_detail_uid = dtl.level_detail_uid
ORDER BY upper(city_name)
</cfquery>
<cfloop query="getCities">
<cfoutput>
<input type="hidden" name="cityname_#level_detail_uid#"
value="#getCities_city_name#">
</cfoutput>
<td>
<a
href="JavaScript:delete_city('#level_detail_uid#','#city_id#','#form.cityname_#level_detail_uid##')"
class="PageInnerNavigationHeadingSmall">Delete City</a>
</td>
</table>
</body>
</form>
</html>
------------------------------------------------------
Suppose the level_detail_uid is 12345.
After executing this it says
"element cityname_ is undefined in form
Please kindly help.....
Thanking in advance....
Regards,
Aswathy.