0

Hi, I know you can edit the htaccess file I think to allow php scripts to run and be parsed in html files. I was wondering if that was possible with coldfusion code. What I have is a small bit of coldfusion code and ajax that just returns some data asynchronously within a page. The problem I think though will be that this code needs to be run from an html page. Otherwise I would need of course a cfm template to run this code. Thanks for any advice and help!

3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by osekmedia
0

Not sure why it needs to be in an html page. Creating a small .cfm script that can be used from any page is the simplest. The other option is to configure the CF server to process .html pages (ie so any cfm code is executed). But that's a major change with big ramifications. So I'd think twice before doing it ..

0

hmm not sure I'm following your first bit. What I want is to have a section on my employer's index.html page. In this section would be a small bit of code that utilizes a <cfdiv> thats bound to another cfm page where I perform some calculations and then return the results back to the <cfdiv>

The bit of code on the index.html would need to be a cfform with two cfinput fields.

I guess all in all, it wouldnt be a big deal just to create the cfform on another cfm template and then link that in the index.html page if users wanted to use this feature.

btw, thanks for the reply...seems your the only guy keeping the CF forum here alive...lol

Edited by teedoff: n/a

0

hmm not sure I'm following your first bit.

The 1st part was just, if you want to use CF code ... then use a .cfm page ;-)

edit the htaccess file I think to allow php scripts to run and be parsed in html files

That's the second option. You can do the same thing w/CF. Just not with the htaccess file. But personally I think that's a bad idea. Making such a global change for one small page is .. unwise IMO.

Edited by arrgh: n/a

0

ok thanks! yeah I think I'll just stick with creating this feature as a .cfm page linked to the home page. Thanks again!

0

You can use a jquery window and load the data from a cfm file into the window with ajax.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.