I guess its the tokeniser barfing on the 2 <cfoutout> and only one </cfoutput>. It wouldn't care about the logic...
 
I'd write it this way...
 
<cfif NOT IsDefined("form.search")>
    <cfset records_to_display        = allbooks.recordcount />
    <cfset the_start                       =    1>
 </cfif>

<cfoutput query="allbooks" STARTROW="#the_start#" MAXROWS="#records_to_display#">
 
Justin
-----Original Message-----
From: Ian Westbrook (FDM) [mailto:[EMAIL PROTECTED]
Sent: 20 April 2004 14:12
To: CFUG List
Subject: [ cf-dev ] why the hell doesn't this work?

anyone any idea why this doesn't work?
 
<cfif IsDefined("form.search")>
<cfoutput query="allbooks">
<cfelse>
<cfoutput query="allbooks" STARTROW="#the_start#" MAXROWS="#records_to_display#">
</cfif>
I keep getting the 'extraneous </cfoutput> tag' error from the output's close. All I'm doing is choosing one of the output tags depending on whether a form variable exists or not. If I use either of the output tags straight off, it works fine.
 
any ideas?
 
Ian W
 

Reply via email to