in the following code, I am getting an error that form is undefined when I click the links in the bottom table, the checkboxes work just fine, but the <a href="#"> tags wont submit the form. Why?
<cfparam name="form.sort" default="">
<cfparam name="url.order" default="desc">
<cfparam name="form.submitted" default="true">
<cfparam name="form.review" default="">
<cfparam name="form.completed" default="">
<cfparam name="form.closed" default="">
<cfquery name="Recordset1" datasource="Data_Set">
SELECT *
FROM dbo.itrequest
WHERE status = 'submitted'
<cfif form.review EQ 'true'>
OR status = 'under review'
<cfelseif form.completed EQ 'true'>
OR status = 'completed'
<cfelseif form.closed EQ 'true'>
OR status = 'closed'
<cfelse>
</cfif>
ORDER BY
<cfif form.sort is "id">
id
<cfelseif form.sort is "requestedby">
requestedby
<cfelseif form.sort is "category">
category
<cfelseif form.sort is "priority">
priority
<cfelseif form.sort is "status">
status
<cfelseif form.sort is "assignedto">
assignedto
<cfelseif form.sort is "status">
status
<cfelseif form.sort is "date">
date
<cfelse>
id
</cfif>
<cfif #isdefined('url.order')# and #url.order# is "ASC">
ASC
<cfelse>
DESC
</cfif>
</cfquery>
<cfif #URL.order# is 'desc'>
<cfset #URL.order# = 'asc'>
<cfelseif #URL.order# is 'asc'>
<cfset #URL.order# = 'desc'>
</cfif>
<!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=utf-8" />
<title>Untitled Document</title>
<link href="ITstyles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<cfinclude template="itheader.cfm">
<p align="center"><strong>All
orders: <cfif #form.sort# NEQ ''>sorted by <cfoutput>#form.sort# - #url.order#</cfoutput></cf
if> </strong></p>
<p align="center">Show Only:</p>
<form id="form1" name="form1" method="post" action="itorders.cfm?order
=<cfoutput
>#url.orde
r#</cfoutp
ut>">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="221"><div align="right">
<input type="checkbox" name="review" id="review" value="true" onClick="form.submit()" <cfif form.review EQ true>checked</cfif>/>
</div></td>
<td width="279">under review (is being reviewd by asignee)</td>
</tr>
<tr>
<td><div align="right">
<input type="checkbox" name="completed" id="completed" value="true" onClick="form.submit()" <cfif form.completed EQ true>checked</cfif>/>
</div></td>
<td>completed has been completed)</td>
</tr>
<tr>
<td><div align="right">
<input type="checkbox" name="closed" id="closed" value="true" onClick="form.submit()" <cfif form.closed EQ true>checked</cfif>/>
</div></td>
<td>closed (original assigner has closed this order.)</td>
</tr>
<tr>
<td><div align="right"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="right"></div></td>
<td> </td>
</tr>
</table>
<p align="center"> </p>
<table width="100%" border="1"cellpadding="2" cellspacing="2">
<cfoutput>
<tr>
<td colspan="101">#Recordset1.
RecordCoun
t# Records Total</td>
</tr>
</cfoutput>
<tr bgcolor="#6695FF">
<td width="5%"><a href="#" onClick="sort.value='id'; document.form.submit()">id
</a></td>
<td width="3%"><div align="center"><a href="#" onClick="sort.value='id'; form.submit()">category</a
></div></t
d>
<td width="6%"><div align="center"><a href="#" onClick="sort.value='date'
; form.submit()">Date Requested</a></div></td>
<td width="8%"><a href="#" onClick="sort.value='reque
stedby'; form.submit()">requestedby
</a></td>
<td width="12%"><a href="#" onClick="sort.value='assig
nedto'; form.submit()">assignedto<
/a></td>
<td width="12%">title</td>
<td width="40%">issue</td>
<td width="5%"><a href="#" onClick="sort.value='prior
ity'; form.submit()">priority</a
></td>
<td width=""><a href="#" onClick="sort.value='statu
s'; form.submit()">status</a><
/td>
</tr>
<cfset #currentrow# = 1>
<cfoutput query="Recordset1" startrow="1">
<cfif #currentrow# mod 2 is 1>
<tr bgcolor="##FFFFFF">
<cfelse>
<tr bgcolor="##cccccc"></cfif>
<td align="left"><a href="itdetails.cfm?record
ID=#Record
set1.id#">
000000#Rec
ordset1.id
#</a></td>
<td><div align="center">#Recordset1
.category#
</div></td
>
<td><div align="center">#trim(datef
ormat(Reco
rdset1.dat
e, 'mm/dd/yy'))#</div></td>
<td><a href="mailto:#Recordset1.s
rcemail#">
#Recordset
1.requeste
dby#</a></
td>
<td><a href="mailto:#Recordset1.a
ssignedto#
">#Records
et1.assign
edto#</a><
/td>
<td>#Recordset1.title# </td>
<td><textarea name="issue" cols="80" rows="6" readonly="readonly">#Recor
dset1.issu
e#</textar
ea></td>
<td>#Recordset1.priority# </td>
<td>#Recordset1.status# </td>
</tr>
</cfoutput>
</table>
<input name="sort" id="sort" type="hidden" value="" />
</form>
<br />
<br />
<table align="center">
<tr>
<td><div align="center"><a href="itcomplete.cfm?edit=
n">View closed orders here.</a></div></td>
</tr>
</table>
</body>
</html>