why do I have to do that for the bottom ones? because we are not inside a form element?
Main Topics
Browse All Topicsin 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/xhtm
<html xmlns="http://www.w3.org/1
<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
<p align="center">Show Only:</p>
<form id="form1" name="form1" method="post" action="itorders.cfm?order
<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.
</tr>
</cfoutput>
<tr bgcolor="#6695FF">
<td width="5%"><a href="#" onClick="sort.value='id'; document.form.submit()">id
<td width="3%"><div align="center"><a href="#" onClick="sort.value='id'; form.submit()">category</a
<td width="6%"><div align="center"><a href="#" onClick="sort.value='date'
<td width="8%"><a href="#" onClick="sort.value='reque
<td width="12%"><a href="#" onClick="sort.value='assig
<td width="12%">title</td>
<td width="40%">issue</td>
<td width="5%"><a href="#" onClick="sort.value='prior
<td width=""><a href="#" onClick="sort.value='statu
</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
<td><div align="center">#Recordset1
<td><div align="center">#trim(datef
<td><a href="mailto:#Recordset1.s
<td><a href="mailto:#Recordset1.a
<td>#Recordset1.title# </td>
<td><textarea name="issue" cols="80" rows="6" readonly="readonly">#Recor
<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=
</tr>
</table>
</body>
</html>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: Mr-EnePosted on 2008-04-07 at 12:33:28ID: 21299848
document.forms['form1'].su bmit();