That's funny, in CFAjax this doesn't cause a problem at all. I was just 
blogging about using firebug and noticed how it comes back differently 
in the response, so that preceding script blocks don't break the return.

http://www.fergusonhouse.com/blog/index.cfm/2006/7/26/firebug-cfajax

One of the other guys here at the office was having trouble trying to 
use AjaxCFC and when we looked at the response in firebug, you could see 
the differences in the response that was messing things up. Try looking 
at your posts and responses in firebug and you'll see the difference 
too. My coworker is planning to jump into the AjaxCFC code and fix this, 
but has yet to find the time.

*****************
Ken Ferguson
214.636.6126
*****************






Brad Wood wrote:
> Ok, so I've got ajaxcfc running pretty smoothly, but I still need some
> help with my major catching point-cfhtmlhead.
>
>  
>
> As part of my CFC, I cfsavecontent a page from our application and
> return the html to stick in an the innerHTML of a div on the ajax page.
> Our application uses cfhtmlhead a lot to stick javascript in the head of
> the document for various reasons.  The problem is that CF appends the
> htmlhead information to the top of the return value that my CFC sends
> back to the browser and that really screws stuff up.  Ajaxcfc sees this
> coming back from the webservice:
>
>  
>
>  
>
> <script language="JavaScript1.2" type="text/javascript">
>
> <!--
>
>             This comes from the cfhtmlhead tag and totally screws up
> ajaxcfc
>
> -->
>
> </script>
>
>  
>
> _4304_1153931164505 = 'This is my content being returned';
>
> DWREngine._handleResponse('4304_1153931164505', _4304_1153931164505);
>
>  
>
> So the obvious answer here is probably "Don't use cfhtmlhead" you idiot,
> but I'm trying to NOT have to write as much as my application as
> possible-I want a scalable fix that will still let me include or
> cfmodule any page in my app and simply return the resulting HTML from
> the CFC.  I can find every instance of cfhtmlhead and put an if
> statement around it or something, that that sounds like a kludgy fix.  
>
>
>
> Is there a pretty way to handle this?
>
>  
>
> ~Brad
>
>                         
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247793
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to