As always thanks Dave!!!!

Duane


> -----Original Message-----
> From: Dave Watts [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, October 22, 2000 4:27 PM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: Parent/Child CFML Tags
>
>
> > > How do you get the child tag to access the attributes of the
> > > parent?
> > >
> > > <cf_MyParentTag Attrib1="test1" Attrib2="test2">
> > >   <cf_MyChildTag ShowAttrib="Attrib1">
> > > </cf_MyParentTag>
> >
> > Also how do you pass data from the parent tag to the child
> > tag without using the request scope? For instance if I set
> > a variable called X in the parent how do I out put it in the
> > child
>
> You've got lots of options for this, depending on how you create the
> variable in the parent tag. If you set a local variable within the parent
> tag, you can reference it from within the child tag using the
> GetBaseTagData
> function:
>
> <!--- cf_MyParentTag --->
> <cfset Variables.X = "42">
> <!--- end cf_MyParentTag --->
>
> <!--- cf_MyChildTag --->
> <cfset stBaseData = GetBaseTagData("cf_MyParentTag")>
> <cfset ParentX = stBaseData.Variables.X>
> <cfoutput>#ParentX#</cfoutput>
> <!--- end cf_MyChildTag --->
>
> Alternatively, there are all kinds of scopes available to both the parent
> and child tags: Request, Caller (which for both parent and child tags will
> resolve to the calling page's local Variables scope), Application, Session
> and Server.

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to