Don't forget that CFCONTENT tag when working with Spry

Just a reminder - a friend of mine went through an hour of banding his head against the wall when a Spry example worked fine in IE6 and Firefox, but not the lovely IE7. Turned out that IE7 was being more demanding on the content type. He had forgotten to add:

<cfcontent type="text/xml">

IE7 decided that since the content type wasn’t set right, it would just plain ignore the result. Awesome.

As a tip - this friend was using Model-Glue. When I do Ajax stuff in Model-Glue, I normally route all my events to an event handler just for XML events. This event works a lot like a normal “template” event, except this time the template is for XML. It basically does:

<cfset content = viewState.getValue("content"> <cfcontent type="text/xml" reset="true"><cfoutput>#content#</cfoutput>

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments