I am writing a new text file, after submitting the form.
I have a form field "LineNo" which I don't want to add in my new file
that form var can be only 6 or can be 1,4,6
how can I stop adding those line in my "writenow" var


the x is basically is containing the line #


<cfif IsDefined('form.submitpressed') AND #form.submitpressed# EQ 1>
<cfset writenow = "">
<CFSET crlf = Chr(13) & Chr(10)>

<cfset gotill = #Evaluate((StructCount(form))#>

<cfloop from="1" to="#gotill#" index="x">

<cfset writenow = #writenow# &
"#trim(form["title#x#"])#|#trim(form["story#x#"])#|#trim(form["link#x#"])#|#
trim(form["target#x#"])#">

<cfif #x# LT #gotill#>
  <cfset writenow = #writenow# & "#crlf#">
</cfif>
</cfloop>

<!--- <cfloop list="#form.lineNo#" delimiters="," index="abc">
  <CFSET NewFile = ListDeleteAt(#writenow#,#x#)>
</cfloop>
--->

<cffile action="" file="C:\CFusionMX\wwwroot\dev\infiniti\news.txt"
output="#writenow#">
<cfoutput>#writenow#</cfoutput>
</cfif>

Thanks
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to