Listfind takes the arguments (list,value,[delimiter])

You are passing (value,list)

Jerry Johnson

>>> [EMAIL PROTECTED] 12/04/03 02:03PM >>>
Bushy here...

FLAME OR NO FLAME...THAT IS THE QUESTION! ;-D

I've gone through all the list functions and can't my code to work properly and I don't know why.

I'm passing a directory name via URL to another template. Every time a link is clicked the directory name is appended to the previous variable.

If I click on a directory which was already appended to the variable it appears again. What I want to do is check the variable against the url variable and if it exists skip the <cfset which appends
the url to the previous.

I'm rambling...I know.

In this example I click on a link "data". This gets passed to my template as "URL.Add". I then do another <CFSET which appends it to my SESSION variable

<CFSET SESSION.additem = ListAppend(SESSION.additem,URL.Add)>

So now SESSION.additem = data

I then click on another link "data2" which gets passed via URL and appended.

SESSION.additem= data,data2

and so on...So whatever is passed in the URL.add variable I want to check if it exists in the SESSION.additem variables regardless of order and if it does exists do whatever...

The following <CFIF statement seems to work if the SESSION variable is cleared and I click on the first directory but after that it can't find the match.
I've tried all the LIST and FIND functions with limited success.

What am I doing wrong? I know its so simple..

Here is my code:

<CFPARAM NAME="SESSION.ADDITEM" DEFAULT="">
<CFPARAM NAME="URL.ADD" DEFAULT="">

<CFSET SESSION.additem = LISTAPPEND(SESSION.additem,URL.Add)>
<CFSET SESSION.additem = ListSort(SESSION.additem,"Text","ASC")>

<CFIF ListFind(#URL.Add#,"#SESSION.additem#")>
Match Found<br>
<CFELSE>
No Match Found<br>
</CFIF>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to