Rick,

Why can't the variables be URL variables?  I think creating them as URL  
variables is actually your best bet.  If you use a scope like session  
or application, you are certainly looking at race conditions which  
cause mysterious bugs like the ones you are describing.  Consider the  
following example:

<html>
     <cfloop from="1" to="3" index="i">
         <iframe src="filler.cfm?myvar=<cfoutput>#i#</cfoutput>">
     </cfloop>
</html>

Now filler.cfm:

<html>
     <cfoutput>#url.myvar#</cfoutput>
</html>

This code works perfectly, rendering three iframes with documents  
containing the numbers 1, 2, and 3.

Hope this helps.

Cantrell

On Monday, December 2, 2002, at 12:51 AM, Rick Faircloth wrote:

> Hi, all.
>
> I was wondering if anyone had any experience with using Cold Fusion
> and IFrames.  I've been trying to setup a page that has one or more  
> IFrames,
> depending on query results, that send information to a page that is the
> content
> page for the IFrames.  I loop the output from the query on the first  
> page,
> and the IFrames are created and the IFrame content page does display  
> in the
> IFrame, but the content is the same for each IFrame content page.
>
> In other words, the page that populates the IFrames is created  
> dynamically,
> based
> on the variables sent to it.  When the page holding the IFrames loops
> through its
> query results, those results are sent during each loop to the IFrame  
> content
> page
> where it is created dynamically, then the page is brought in to the  
> IFrame.
>
> The problem is, the IFrame content page reflects only the last loop's
> variables in all
> three IFrames.  I can't figure out how to get each loop's variables in  
> the
> various IFrames.
> Since the variables can't be URL variables or Form variables, I created
> application
> variables so the variables would be available to the IFrame content  
> pages.
> That worked, but the only version of the IFrame content page to show  
> up in
> the IFrames
> was the version with the last loop's variables.
>
> It seems like what is happening is that the IFrame content page is not
> created until
> the full page is rendered that contains the IFrames.  Then, last, the  
> IFrame
> content pages
> are included.  In this case, it's the last loop's variables that show  
> up,
> because that's the
> last version of the page that was created before it's inclusion in the
> IFrames.
>
> Most likely, only one version of the IFrame content page can exist at  
> one
> time, therefore
> it shows up in each IFrame.  I even tried creating separate IFrame  
> content
> pages to
> populate the IFrames, but even then the variables didn't change.  ?????
>
> I hope this makes some sense...
>
> This is driving me crazy!
>
> I've just about given up on using IFrames in this manner because they
> just seemed to be more trouble than they are worth...
>
> Rick
>
> -------------------------------------------------
> Rick Faircloth
> Prism Productions
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to