Brook,

I don't think that DHTML will render correctly for cfdocument no matter what
you do.

-Mark
 


Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

-----Original Message-----
From: Brook Davies [mailto:cft...@logiforms.com] 
Sent: Thursday, August 13, 2009 7:32 PM
To: cf-talk
Subject: CFDOCUMENT SRC="" and Dynamic HTML


Is there any way to capture a rendered page that uses DHTML? I have a simple
test case where I use some JS to do a document.write('test') to the page and
then use CFDOCUMENT to grab the page via the src attribute. But none of the
dynamic content is ever rendered. Has any one had any success with this?

The only workaround I can think of, and its convoluted and I am not even
sure it would work:

1.      Create a Unique ID server side and write a database entry for the
content to fetch
2.      Call cfdocument or cfhttp to fetch the page, passing the uniqueID.
3.      On the page, include an ajax call back to send back to the server
the documents innerHTML (which should be the dynamic output) along with the
uniqueID
4.      The server (polls?) gets the new HTML from the database and uses it
with CFDOCUMENT to create the page.

This is a bit crazy right? There has got to be a better way. And oh yeah,
The output is generated through a lot of JS, so I can't easily reproduce it
on the server and avoid these steps. But, I wish there was some other way..


Brook





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325452
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to