The problem is hidden deep in the ColdFusion documentation where it says
that for any JS to execute, it needs to be written in a special format for
it to run. The problem with any of the ColdFusion generated JS for the Ajax
UI stuff it is not always written in the way it needs to be written, and on
top of that there are certain CFAjax UI stuff that require to generate the
content in the html head to actually run.

 

The problem with this is that once the page is already loaded, ColdFusion
can't generate this JS in the HTML Head with Ajax generated content. Which
cause problems further down the track. I have seen people generate proper
HTML/Head/Body tags for the generated content returned via Ajax, but to be
honest this is a solution that I would not really recommend.

 

 

Regards,

Andrew Scott

 <http://www.andyscott.id.au/> http://www.andyscott.id.au/

 

 

 

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf
Of Ayudh Nagara
Sent: Friday, 4 February 2011 11:41 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] CFFILEUPLOAD in an Ajax call

 

Steve,
This reminds me of a similar problem I had some time ago, not sure if
relevant here. If the content you're trying to load inside the div is pure
HTML does it work? You mentioned the AJAX response contains scripts and
maybe that's where the problem lies. I recall that when AJAX loads
javascript inside a div, it seems to be treated as static content and the
script will just sit there and does not execute. So if your component
functionality depends on javascript execution nothing will happen.

If your content is purely javascript (and any HTML bits can be easily
javascripted), my suggestion is to use the jQuery getScript method. This way
the loaded content is executable.

On Fri, Feb 4, 2011 at 10:58 AM, charlie arehart
<charlie_li...@carehart.org> wrote:

I'm afraid I can offer nothing more. Glad we ruled out the one issue. 

I'll say (just personal opinion, no offense intended) that that seems a
fairly esoteric combination things you're trying, so I won't be surprised if
few can help. 

If you don't get an answer here, I'd recommend the CF forums at Adobe
(http://forums.adobe.com/community/coldfusion). There's none on Ajax, per
se, but there is one on "rich forms" that has had Ajax discussions:
http://forums.adobe.com/community/coldfusion/coldfusion_forms, or even this
one on "flash integrations":
http://forums.adobe.com/community/coldfusion/coldfusion_flash_integration.

Hope that's helpful.

 

/charlie

 

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf
Of Steve Onnis
Sent: Thursday, February 03, 2011 6:23 PM


To: cfaussie@googlegroups.com
Subject: RE: [cfaussie] CFFILEUPLOAD in an Ajax call

 

Ok

 

I am calling a page via ajax and injecting the returned HTML into a div.

 

The request response contains all of the required scripts and there is a div
there which looks like <div id="cf_fileUpload12345678"></div> but there is
nothing inside it

 

If i call the page on its own the fileupload component displays fine. It is
only when it is called via ajax that it does not load, so the issue is not
with the script paths or whatever.

 

There is some javascript that has  a function in it to create the upload
component and embed it into the page and there is another function that
looks like ColdFusion.Event.registerOnLoad(_cf_fileupload12345687) that i am
guessing registers the function that is used to embed the flash to run when
the page has loaded....but when using ajax there is no "onLoad" method for
the window so it never gets run.  This is where the issue lies.

 

I need a way to fire the onload event but i don't want to do it for the
window event because i have other things running there that i don't want to
run again so i just need to be able to run the ColdFusion.Event ones.

 

I am right here?

 

Steve

 

-- 

You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com
<mailto:cfaussie%2bunsubscr...@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

 

-- 
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to