I have a framed page with 2 frames...left and right. The left frame displays a dynamic list and of course when you click on one item in the list, the right frame displays the details of that item. I wanted to be able to use the right frame as an Update query, but it doesn't seem to work completely. I can enter data in the forms, but the data doesn't seem to be there when I go back and look at that products details. Once the data has been entered, I have a "success" page which has links back to the framed page.
ok I know frames are frowned upon, but this is not a public application. This will strickly be used for database management and data entry. I wanted to use this method simply so that data entry people could view the dynamic data on the left, and be able to update from the right all without having to move from page to page. Seems like this would be somewhat quicker and easier as well.
Here is my frame.cfm code:
function(){return A.apply(null,[this].concat($A(arguments)))}
<cfparam name="URL.ID" default="1">
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "form1">
<cfquery datasource="rlbulbs">
UPDATE rlbbulbs
SET
item=<cfqueryparam value="#FORM.item#" cfsqltype="cf_sql_varchar" maxlength="255">
, brandID=<cfqueryparam value="#FORM.brandID#" cfsqltype="cf_sql_varchar">
, bulbDesc=<cfqueryparam value="#FORM.bulbDesc#" cfsqltype="cf_sql_varchar">
, cost=<cfqueryparam value="#FORM.cost#" cfsqltype="cf_sql_varchar">
, price=<cfqueryparam value="#FORM.price#" cfsqltype="cf_sql_varchar">
, qtyPerPrice=<cfqueryparam value="#FORM.qtyPerPrice#" cfsqltype="cf_sql_varchar">
, qtyInStock=<cfqueryparam value="#FORM.qtyInStock#" cfsqltype="cf_sql_varchar">
, wattage=<cfqueryparam value="#FORM.wattage#" cfsqltype="cf_sql_varchar" maxlength="255">
, voltage=<cfqueryparam value="#FORM.voltage#" cfsqltype="cf_sql_varchar" maxlength="255">
, acDC=<cfqueryparam value="#FORM.acDC#" cfsqltype="cf_sql_varchar" maxlength="255">
, base=<cfqueryparam value="#FORM.base#" cfsqltype="cf_sql_varchar" maxlength="255">
, glass=<cfqueryparam value="#FORM.glass#" cfsqltype="cf_sql_varchar" maxlength="255">
, filament=<cfqueryparam value="#FORM.filament#" cfsqltype="cf_sql_varchar" maxlength="255">
, avgLife=<cfqueryparam value="#FORM.avgLife#" cfsqltype="cf_sql_varchar" maxlength="255">
, beamAngle=<cfqueryparam value="#FORM.beamAngle#" cfsqltype="cf_sql_varchar" maxlength="255">
, oldPage= <cfqueryparam value="#FORM.oldPage#" cfsqltype="cf_sql_varchar" maxlength="255">
, keyWords=<cfqueryparam value="#FORM.keyWords#" cfsqltype="cf_sql_varchar" maxlength="2147483647">
, image1=<cfqueryparam value="#FORM.image1#" cfsqltype="cf_sql_varchar" maxlength="255">
WHERE bulbID = #URL.ID#
</cfquery>
<cflocation url="bulbSuccess.cfm">
</cfif>
<cfquery name="rsBulbs" datasource="rlbulbs">
SELECT *
FROM rlbbulbs
WHERE bulbID = #URL.ID#
</cfquery>
<cfif not isDefined("URL.ID")>
<cflocation url="frame.cfm" addtoken="yes">
</cfif>
Here is my frame.cfm code:
<!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>Bulb Details</title>
<!--- Frames --->
</head>
<frameset cols="20%,*">
<frame name="left" src="frameBulbs.cfm" />
<frame name="right" src="frameBlank.cfm" />
</frameset><noframes></noframes>
</html>
Thanks in advance for any help.