internetguy
Technical User
I am doing a project where you click on a location on a map, and Coldfusion will query a database for that location. I got everything to work right, except for the fact that the coldfusion tags are being ignored. I have a function that sets a td tag's innerHTML to display the query results.
When executed it displays the data, but only the "SELECT * FROM spi_div..." coldfusion commands along with the variables below. Does innerHTML ignore server side languages and do HTML only?
Code:
<map name="arizona">
<area shape="rect" coords="40,124,90,148" href="#" onClick="displaylocation('25')">
</map>
function displaylocation(location){
el = document.getElementById("location");
el.innerHTML = "<cfquery datasource='spi' name='getlocations'>SELECT * FROM spi_div WHERE id='"+location+"'</cfquery><p><cfoutput query='getlocations'>#street#<br>#city# #st# #zip#<br>Phone - #phone#<br>Fax - #fax#</cfoutput>";
}