This one is not W3C-compliant HTML, because of the single quotes:

<cfset pathstring= "<a href='mypage.cfm'>blah</a>">

The others are all good.  If you take the above and switch the single and
double quotes, you'll be okay:

<cfset pathstring= '<a href="mypage.cfm">blah</a>'>

tom


"bfalloon" <[EMAIL PROTECTED]> wrote in message
3acbdad5$[EMAIL PROTECTED]">news:3acbdad5$[EMAIL PROTECTED]...
> WOW!
>
> Thanks everyone!
>
> So many solutions! Which should I use??
> Are there any drawbacks with any of  the solutions below?
>
> <cfset pathstring= "<a href='mypage.cfm'>blah</a>">
>
> <cfset pathstring= "this is ""my"" bar">
>
> <cfset pathstring=Evaluate(DE('<a href="blah.cfm">Category</a>'))>
>
> <cfset pathstring='<a href="blah.cfm">Category</a>'>
>
> Thanks for the prompt responces!
>
> Benjamin
>
>
>
>
> "David Baskin" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Benjamin, just escape the quotes with an extra quote.
> >
> > <cfset foo = "this is ""my"" bar">
> >
> > HTH,
> >
> > david
> >
> > -----Original Message-----
> > From: bfalloon [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 05, 2001 7:05 AM
> > To: CF-Talk
> > Subject: CFSETTING "HTML Strings" *URGENT*
> >
> >
> > Hello,
> >
> > Can someone help me with this problem?
> >
> > I want to create a string that contains HTML. Specifically a 'path'
string
> > to be
> > outputted at the top of a page with variable content. The problem that I
> > have
> > is that I need to do something like this...
> >
> > <cfset pathstring = "<a href="blah.cfm">Category</a> <a
> > href="subcategory.cfm">Sub</a>">
> >
> > The problem is that because of the quotation marks within the string
> itself,
> > it is terminating
> > the CFSET command before it gets to the end of the string.
> >
> > I'm not sure if I should use the converted HTML ie. < becomes &lt; and
so
> on
> > because I need to output 'functional' HTML on the page below this CFSET,
> not
> > 'display' HTML.
> >
> > Can someone explain how this should be phrased.
> > I may also need to append more string information onto the end of this
> > string
> > depending of other query results.
> >
> > Thanks in advance!
> >
> > Benjamin Falloon
> > Objektmedia
> > www.objekt.com.au
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to