Hi everyone
I have 6 textarea boxes in the form page before the action page.
When I do a dataimport strait to the DB I have all the text, including
the carriage returns in between them. However, when I try to edit it
through the web application, the application cuts off the text.
Debugging output correctly displays the text. Somewhere when the
<cfinsert> goes in it doesn't work too well. I changed to cfinsert from
a manual <cfquery> because...well I forgot why because I didn't write it
down, but I remember it was a good reason. I don't think it worked
correctly with a <cfquery> before. I'm fairly certain <cfinsert> works
correctly, its the <cfupdate> that I have my doubts about
=========================================================================
[CF 5.0 Professional]
[mySQL Ver 11.13 Distrib 3.23.36, for redhat-linux-gnu (i386)]
[Code for form_page.cfm]
<!---
Author: Won Lee
Created:
Updated:
Project: SpaceDX
Page: template.cfm
Anything edited with the meat and poratoes section will not have an
affect on the template.
--->
<!--- login check throughout the whole site --->
<cfmodule template="../includes/loginCheck.cfm"
accessLevel=#request.accessLevel# orgPage=#cgi.script_name#>
<cfquery name="getGroup" datasource="#request.dsn#">
SELECT G.groupID, G.gName
FROM groups G
</cfquery>
<cfquery name="getInventory2" datasource="#request.dsn#">
SELECT *
FROM groups G, summary S
WHERE (G.groupID = #session.inventoryGroupID#) AND G.groupID =
S.groupID
</cfquery>
<cfif getInventory2.recordcount GT 0>
<cfset variables.summaryID = getInventory2.summaryID>
<cfelse>
<cfset variables.summaryID = 0>
</cfif>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>SpaceDX</title>
<link rel="stylesheet" type="text/css" href="../includes/ksa.css">
</head>
<body>
<table border="1" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td class="pagetitle">SpaceDX</td>
</tr>
<tr>
<td class="nav"><cfinclude
template="../includes/nav_public.html"></td>
</tr>
<tr>
<td>
<!--- *********************************The Meat and
Potatoes*************************** --->
<table width="100%">
<!--- module to change group --->
<form action="change_group.cfm" method="post">
<tr>
<td class="text">
Group:
<select name="groupID">
<cfoutput query="getGroup">
<option value="#getGroup.groupID#" <cfif
getGroup.groupID EQ session.inventoryGroupID>selected</cfif>>
#getGroup.gName#</option>
</cfoutput>
</select>
<input type="submit" value="change group"><br><br>
</td>
</tr>
</form>
<tr>
<td>
<!--- ************************************************** --->
<cfoutput>
<table width="100%" border="0">
<!--- major structural --->
<tr>
<td><a href="select.cfm?sumCatID=1
&summaryID=#variables.summaryID#">Major Structural</a></td>
</tr>
<form name="theForm" action="inventory_action.cfm" method="post">
<input type="hidden" name="summaryID"
value="#variables.summaryID#">
<input type="hidden" name="groupID"
value="#session.InventoryGroupID#">
<tr>
<td>
<textarea cols="100" rows="10" name="structural" row="10">
#Trim(getInventory2.structural)#</textarea>
</td>
</tr>
<tr>
<td><a href="select.cfm?sumCatID=2
&summaryID=#variables.summaryID#">Mechanical</a></td>
</tr>
<tr>
<td>
<textarea cols="100" rows="10" name="mechanical"
row="10">#getInventory2.mechanical#</textarea>
</td>
</tr>
<tr>
<td><a href="select.cfm?sumCatID=3
&summaryID=#variables.summaryID#">Electrical</a></td>
</tr>
<tr>
<td>
<textarea cols="100" rows="10" name="electrical"
row="10">#Trim(getInventory2.electrical)#</textarea>
</td>
</tr>
<tr>
<td><a href="select.cfm?sumCatID=4
&summaryID=#variables.summaryID#">Safety</a></td>
</tr>
<tr>
<td>
<textarea cols="100" rows="10" name="safety" row="10">
#Trim(getInventory2.safety)#</textarea>
</td>
</tr>
<tr>
<td><a href="select.cfm?sumCatID=5
&summaryID=#variables.summaryID#">Vertical</a></td>
</tr>
<tr>
<td>
<textarea cols="100" rows="10" name="vertical"
row="10">#Trim(getInventory2.vertical)#</textarea>
</td>
</tr>
<tr>
<td><a href="select.cfm?sumCatID=6
&summaryID=#variables.summaryID#">Misc</a></td>
</tr>
<tr>
<td>
<textarea cols="100" rows="10" name="misc" row="10">
#Trim(getInventory2.misc)#</textarea>
</td>
</tr>
<tr>
<td align="center"><br><input type="submit" value="Save
Summary"></td>
</tr>
</form>
</table>
</cfoutput>
<!---
******************************************************************** --->
</td>
</tr>
</table>
</body>
</html>
[Code of action_page.cfm]
<cfparam name="form.summaryID" default="0" type="numeric">
<cfparam name="form.groupID" default="1" type="numeric">
<cfif NOT form.summaryID>
<cfinsert datasource="#request.dsn#" tablename="summary"
dbtype="ODBC">
<cfelse>
<cfupdate datasource="#request.dsn#" tablename="summary"
dbtype="ODBC">
</cfif>
<cflocation url="inventory.cfm">
==================================================================
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists