This is a fairly long message, but I think I included all of the relevent
code.  I wanted to make sure you all had everything you needed.
To get to the live example (65.26.8.241), click on either Video or Internet
Catalog, this gives you a list (The MyCat on the left is an arrayLen of the
MyCat Array, Then click on view, On the left click "add Lot ???" this adds
the lot to your personal catalog (this works fine), now click any of the
other views on the side or the list and watch MyCat increase by one.  As you
can see by the url parameters, this should not happen and I am printing the
ArrayLens at the top and bottom of the pages.  You will see that on the page
you add the Lot to MyCat, The top output (which is on the application page)
is one less than the Bottom (which is the last piece of code executed).
Once you click another link the value increases at the top of the
application already (This is where I am completely puzzled as to how this
can even happen!!!!):

-----------------Called Page---------------------------------------
<cfinclude template="CFScript.sla">
<body background="#FFFFFF" link="#9C5939" alink="#9C5939" vlink="#9C5939"
leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"
onLoad="MM_preloadImages('images/Title_r2_c3_f2.gif','images/Title_r4_c3_f2.
gif','images/Title_r6_c3_f2.gif','images/Title_r10_c2_f2.gif','images/Title_
r10_c4_f2.gif','images/Title_r10_c5_f2.gif','images/Title_r10_c6_f2.gif','im
ages/Title_r10_c7_f2.gif','images/Title_r10_c10_f2.gif','images/Title_r10_c1
1_f2.gif');">
<table border="1" bordercolor="#000000" cellpadding="0" cellspacing="0"
align="center">
        <tr>
                <td colspan="2"><cfinclude template="Title.sla"></td>
        </tr>
        <tr>
                <td bgcolor="#FFE7BC" class="CatalogHeader" valign="top">
                        <img src="images/spacer.gif" width="185" height="1"
border="0">
                        <cfinclude template="CatSearch.sla">
                </td>
                <td align="right" valign="top">
                        <cfif IsDefined("url.l") and Not
IsDefined("url.mc")>
                                <cfinclude template="CatDetail.sla">
                        <cfelse>
                                <cfinclude template="CatList.sla">
                        </cfif>
                </td>
        </tr>   
</table>
<cfoutput>
        CatList Length = #ArrayLen(Catlist)#<br>
        MyCat Length = #ArrayLen(Catlist)#<br>
</cfoutput>
----------------------Application-------------------------------------
Has not relevent information.
All it does is initiate the arrays when the session is created.
I did include the very top of the page where the application is set up, then
I show the arrayLens
(Notice that after you add to myCat then click any other link the array
increases size!)
<cfapplication name="Superior" 
        clientmanagement="Yes" 
        clientstorage="Superior_Web"
        sessionmanagement="Yes" 
        sessiontimeout="#CreateTimeSpan(0,1,30,0)#" 
        applicationtimeout="#CreateTimeSpan(1,30,0,0)#" 
        setclientcookies="Yes">
        <cfoutput>
        CatList Length = #ArrayLen(Catlist)#<br>
        MyCat Length = #ArrayLen(Catlist)#<br>
</cfoutput>

-------------------------CFScript--------------------------------------
This is only the relevent code to updating the array and copying the data
from
Array 1 to Array 2
.....
if ((IsDefined("url.L")) and (IsDefined("url.A"))){

                U = ArrayLen(Session.MyCat) +1;
                V = url.l;              
                if (ArrayLen(Session.MyCat) eq 0){
                        Session.MyCat[1][1] = session.Show;
                }
                for(T=2; T LTE 53; T=T+1){
                        Session.MyCat[U][T] = 1;//Session.QueryList[V][T];
                }                       
        }
......
        <cfelseif IsDefined("url.mc")>                          
                <cfscript>
                        session.CurList = "MyCat";
                        session.Catlist = Duplicate(session.MyCat);
                        if (IsDefined("url.A")){
                                url.l = U;
                        }               
                        //session.MyCat = Duplicate(session.Catlist);
                </cfscript>
                <cfoutput>MyCat #ArrayLen(Session.MyCat)#<br>CatList
#ArrayLen(Session.Catlist)#</cfoutput>
        </cfif> 
.......

------------------------------------CatSearch-------------------------------
-----
Only included The link to trigger the array entry.
.....<a
href="<cfoutput>#session.url#CatShort.sla?l=#url.l#&mc=1&A=1#session.appendT
oken#</cfoutput>">Add Lot
<cfoutput>#Session.CatList[url.l][2]#</cfoutput></a>
......

If there is anything you all need, just let me know!!!!!!!!


Thank You,
Christian Watt
Webmaster
SkillPath Seminars
[EMAIL PROTECTED] 

-----Original Message-----
From: Jeffry Houser [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 28, 2003 10:23 AM
To: CF-Talk
Subject: Re: <cfDesperate>


  Give us some more information.

  What is the code you use to copy one array information into the 
other?  Where is the code located?  ( Application.cfm, presumably? )
  What scope are you storing the array in?
  What links are you clicking to move from page to page?
  Is there a reason you are using an Array to hold query data instead of a 
query object?

At 11:48 PM 1/27/2003 -0600, you wrote:

>Is anyone on right now???
>
>I have an issue with arrays that I CAN NOT EXPLAIN!!!!
>
>
>
>I have two arrays, one holds returned query data - Array1, the other a 
>personal selection from the first Array - Array2.
>
>When I add data from the first array to the second, no problem, I have 
>an ArrayLen and everything is great.
>
>The problem is that no matter what link I click next, the data gets 
>added again.  I have put ArrayLens from application to the very end.  
>The array length has already changed at the very top of the application 
>page, but is one less at the end of the previous page.  I am not a 
>newbie.  I have been coding CF for over 4 years now and I have never 
>seen anything like this.
>
>Please, if anyone is on, I have examples and live site to see.... CFMX
>W2K
>SQL2000
>
>Christian
>
>[EMAIL PROTECTED]
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to