Skip to main content
November 22, 2007
Question

ajax tags under CFIDE virtual directory not working

  • November 22, 2007
  • 10 replies
  • 1308 views
Hopefully someone here can help..adobe support wasn't very helpful.

When trying to run tags within the ajax library for example cfdiv, I get the error "Error processing javascript in markup for element cf_divXXXXXXXXX: [Enable debugging by adding 'cfdebug; to your URL paramenters to see more information]"

This error does not occur on the default website, but does occur on all other websites with a virutal directory to CFIDE, it also occurs even if I copy over the CFIDE directory. Everything else functions as its supposed to with regards to CFIDE such as cfforms.js, only thing throwing errors are the ajax tags.

Probably some sort of security setting but have no idea what, I have even went to far as to give every account full control of CFIDE to try and get it working but just cant.

Product version: 8,0,0,1762
OS: Windows 2003
Web Server: Microsoft IIS 6
This topic has been closed for replies.

10 replies

Inspiring
December 20, 2007
How does that apply to a framework that uses layout templates? In my situation, my js files are included in a layout template, which is my 'main page', but is included by the framework's architecture.

Does anybody have any idea why my CF ajax functionality would work on a page's first load, but not on subsequent requests?
December 18, 2007
actually it has nothing to do with it being external js or js on the page, it has to do with the js being in an include or in the application.cfm.

Once the js is put on the main page external or not it works.
Inspiring
December 18, 2007
it is definitely in the docs that it is recommended to use external js
files with cf8 ajax-enabled features, as it does not matter than if your
js functions are written as
function someFnName(){}
or as
someFnName = function(){}

with in-page js on ajax-enabled pages you must use the latter form.

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Inspiring
December 17, 2007
I have similar problems with scripts dynamically included from /CFIDE/scripts, and it's nothing to do with permissions or mappings. I've had occasions where a page with a cfgrid works fine the first time it loads, and comes up emtpy (with js errors) on subsequent loads. The only thing that makes it work again is a restart of the CF app service.

So I'm curious -- when you stripped js from your html header, was it script tags with src attributes, or only embedded script that made things work for you once removed? I'm curious to know whether linked script files will give you the same problems that embedded script did.
Community Expert
December 12, 2007
What happens if you attempt to access the JS files directly within your browser?
Dave Watts, Eidolon LLC
December 12, 2007
It asks me if I would like to download the js file.

I kind of got around the problem by removing any javascript from my header include file.

Any javascript in my header include will cause the problem, even something as simple as alert('test')

Once all javascript was removed the error vanished.

November 23, 2007
I'm fairly certain that the appropriate rights are set, but not 100% sure since its not working.

But cfform.js is working without any issue as well as all the masks so not sure.

Virtual Directory is fairly straight forward, but here is an image of what I have in the way of setup.

http://66.193.54.196/untitled-1.gif This is exactly mimicked from the default website where ajax doesnt' give the error.
November 22, 2007
I have tried that as well two different ways. One way was to put in the relative path in relation to the virtual directory

<cfajaximport SCRIPTSRC="CFIDE/scripts" tags="cfdiv">
<cfdiv bind="url:GetTestPage.cfm"></cfdiv>

This gave me the same error as before.

Then I tried with an absolute path

<cfajaximport SCRIPTSRC="D:/Inetpub/wwwroot/CFIDE/scripts" tags="cfdiv">
<cfdiv bind="url:GetTestPage.cfm"></cfdiv>

and got a javascript error 'Coldfusion' is undefined.

I know the 'Coldfusion' is undefined error comes up when it cannot find the scripts directory at all so the absolute path was incorrect.

The error about "Error processing javascript in markup for element cf_divXXXXXXXXX: [Enable debugging by adding 'cfdebug; to your URL paramenters to see more information]"

i think is coming up because of something to do with security permissions but for th elife of me cant figure out what.

**avanthichowdary **
This is probably better left for another thread, but CF8 came out with new tags that utilize ajax functionality, its tax ont he server is no greater than using ajax from other languages, all depends what you use it for.
Inspiring
November 23, 2007
Hi,

Can you confirm that your scripts that are under the /CFIDE/scripts directory have appropriate read/execute rights set?
Inspiring
November 22, 2007
Hi,

Try specifying the "scriptsrc" attribute (of the <cfajaximport> tag) pointing towards to your directory in where you have your AJAX scripts.

Participant
November 22, 2007
can any one there explain me where i can use Ajax? will it slow down if i use log database queries?
November 22, 2007
Real simple

<cfajaximport tags="cfdiv">
<cfdiv bind="url:GetTestPage.cfm"></cfdiv>

and for GetTestpage.cfm

<strong>Hello World</strong>
Inspiring
November 22, 2007
Hi,

Can you post your code here?