Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

coldfusion/javascript question

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
I want to be able to control a div layer like a frame.. without using frames. Basically, what I want is when the user clicks a submit button, it calls a javascript function that writes the innerHTML of the layer. I've gotten this to work using the innerHTML script with java, but I was wondering if anybody has gotten this to work with coldfusion tags. Basically, I want to use the javascript to call a cfinclude tag and load the corresponding template.

Example of what I have that doesn't work....

javascript_functions.js

function temp() {
document.getElementById('price_calc').innerHTML = "<cfinclude template=\"temp.cfm\">";
}

Anyone have any ideas?
 
This is definitely a job for AJAX. What you're trying in your example code doesn't work because CF is parsed on the server, not the client.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Not NULL-terminated yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top