Now I'm really confused.
All the javascript menu does is load different template files.
I need to pass the filename that the user clicks on from the list created
by the <cfdirectory>...<cfoutput query="dirlist">
and your array stuff to the template that the menu loads.
Attached is my code.
Any help would be greatly appreciated.
At 08:38 AM 9/26/01 -0700, you wrote:
>Using the session-scoped structure gives you the ability to transfer the
>CFDIRECTORY results to the other template. What you ask about now is how to
>use the selection made to index into this structure.
>
>I would have to see the code you use to create the menus. As I recall,
>those menus you pop up are done in JaveScript. I already told you I'm not a
>JS expert. Someone else on the list may be able to help out but post your
>code snippet (JS) on the list and ask the question.
>
>What I do know about JS is that you need your JS function that manages the
>menu item selection to return the value of the item selected. I would use
>an integer value and then directly use it to index into the structure key
>list.
>
>Bruce
>
>----- Original Message -----
>From: <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Wednesday, September 26, 2001 4:13 AM
>Subject: Re: Passing the results from the <CFDIRECTORY to another template?
>
>
> > Hi Bruce,
> >
> > How do I retrieve the information on the file that was clicked on the
> > test.cfm page and pass that to the template.cfm
> > to compare for a match and then pull the information from the array.
> >
> > I can't seem to get the Session.stDirFileName[menuSelection] to work?
> >
> > Output from test.cfm page
> >
> > [3] file1.dat
> > [4] file2.dat
> > [5] file3.dat
> > [6] file4.dat
> > [7] file5.dat
> >
> >
> > Output from other template.cfm page
> >
> > [1] .
> > [2] ..
> > [3] file1.dat
> > [4] file2.dat
> > [5] file3.dat
> > [6] file4.dat
> > [7] file5.dat
> >
> >
> >
> > At 11:44 AM 9/24/01 -0700, you wrote:
> > >Make sure you have session management activated...then
> > >
> > ><cfdirectory name="queryName" ...>
> > >
> > ><!--- Create a new structure for each column of info you want --->
> > ><cfset Session.stDirFileName = StructNew()>
> > ><cfset Session.stDirFileSize = StructNew()>
> > >
> > ><cfset RecNo=1><!--- set an index counter --->
> > ><cfoutput query="queryName">
> > > <cfset stDirFileName[RecNo] = Name>
> > > <cfset stDirFileSize[RecNo] = Size>
> > > ...
> > > <cfset RecNo=RecNo + 1>
> > ></cfoutput>
> > >
> > >Then on your other template page...
> > >
> > >The directory listing is:<br>
> > ><!--- loop from 1 to the number of keys in the structure --->
> > ><cfloop index="RecNo" from=1 to=#ListLen(StructKeyList(stDirFileName))#>
> > > #stDirFileName[RecNo]# #stDirFileSize[RecNo]#<br>
> > ></cfloop>
> > >
> > >Give that a whirl...this has not been tested, but should give you the
>idea
> > >on how to complete it.
> > >
> > >Bruce
> > >[EMAIL PROTECTED]
> > >
> > >----- Original Message -----
> > >From: <[EMAIL PROTECTED]>
> > >To: "CF-Talk" <[EMAIL PROTECTED]>
> > >Sent: Monday, September 24, 2001 10:32 AM
> > >Subject: Re: Passing the results from the <CFDIRECTORY to another
>template?
> > >
> > >
> > > > At 10:28 AM 9/24/01 -0700, you wrote:
> > > > >There are multiple ways to pass it. What directory info are you
>wanting
> > >to
> > > > >pass?
> > > >
> > > >
> > > > All the information from the <CFDIRECTORY> Name, Type etc.
> > > >
> > > > >You can pass info from one template to another via:
> > > > > Session vars
> > > > > Client vars
> > > > > Application vars
> > > > > Form fields
> > > > > URL parameters
> > > > > etc
> > > > >
> > > > >You may want to store the directory info you want into a structure or
> > >array,
> > > > >scope it as a Session variable, then reference it on the next
>template.
> > > >
> > > > Yikes. How do I do that?
> > > >
> > > >
> > > > >Bruce
> > > > >[EMAIL PROTECTED]
> > > > >
> > > > >----- Original Message -----
> > > > >From: <[EMAIL PROTECTED]>
> > > > >To: "CF-Talk" <[EMAIL PROTECTED]>
> > > > >Sent: Monday, September 24, 2001 10:00 AM
> > > > >Subject: Re: Passing the results from the <CFDIRECTORY to another
> > >template?
> > > > >
> > > > >
> > > > > > How can I pass the results from the <CFDIRECTORY to another
>template?
> > > > > >
> > > > > > Name
> > > > > > Size
> > > > > > Type..etc
> > > > > >
> > > > >
> > > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists