hello I am attempting to further customize a menu system that consists of head
navs, parent navs and subnavs...it is tri-level. What i am trying to do is
delete the head nav and have it loop through and delete the other levels as
well so they become inactive as well. Any help would be appreciated greatly...
the error i get when trying to delete these naves is as follows:
Element NAVTEXTID is undefined in QRYHEADNAVEDIT.
The error occurred in D:\web\msh\LeaderNet\admin\winNavDelete.cfm: line 10
8 : <cfoutput>
9 : <body onload="self.focus();">
[bold]10 : <form
action="winNavDelete.cfm?navTextID=#qryHeadNavEdit.navTextID#&navID=#qryHeadNavEdit.navid#&parentNavID=#qryGetNavEdit.navid#&navlevel=2&navBranch=#qryGetNavEdit.navBranch#"
method="post">[/bold]
11 : <cfif isDefined("url.NavTextId") and request.user.type eq 4 and
IsDefined("form.fieldnames") IS FALSE>
12 : <cfquery datasource="#request.dsn#" name="qryNav1">
the section of code this is occurring in is as follows:
<form
action="winNavDelete.cfm?navTextID=#qryHeadNavEdit.navTextID#&navID=#qryHeadNavEdit.navid#&parentNavID=#qryGetNavEdit.navid#&navlevel=2&navBranch=#qryGetNavEdit.navBranch#"
method="post">
<cfif isDefined("url.NavTextId") and request.user.type eq 4 and
IsDefined("form.fieldnames") IS FALSE>
<cfquery datasource="#request.dsn#" name="qryNav1">
dbo.spNavigation 1, #url.navID#, null, 4
</cfquery>
<cfif qryNav1.recordCount>
<cfloop query="qryNav1">
<cfquery datasource="#request.dsn#" name="qryNav2">
dbo.spNavigation 1, #qryNav1.navID#, null, 4
</cfquery>
<cfif qryNav2.recordCount>
<cfloop query="qryNav2">
<cfquery datasource="#request.dsn#" name="qryNav3">
dbo.spNavigation 1, #qryNav2.navID#, null, 4
</cfquery>
<cfif qryNav3.recordCount>
<cfloop query="qryNav3">
<cfquery datasource="#request.dsn#"
name="qryNavDelete">spNavDelete '#url.NavTextId#'</cfquery>
</cfloop>
<cfquery datasource="#request.dsn#"
name="qryNavDelete">spNavDelete '#url.NavTextId#'</cfquery>
</cfif>
</cfloop>
<cfquery datasource="#request.dsn#" name="qryNavDelete">spNavDelete
'#url.NavTextId#'</cfquery>
</cfif>
</cfloop>
</cfif>
the stored procedure being used in this case is as follows:
USE [LeaderNet]
GO
/****** Object: StoredProcedure [dbo].[spNavDelete] Script Date: 03/24/2008
17:51:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[spNavDelete]
@navTextID int
AS
BEGIN
UPDATE dbo.nav
SET active = 0
WHERE navID = (select distinct navID from navText where navTextID =
@navTextID)
UPDATE dbo.navText
SET active = 0
WHERE navTextID = @navTextID
and navID = (select distinct navID from navText where navTextID
= @navTextID)
END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301946
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4