Ask a Question related to Coldfusion Database Access, Design and Development.
-
LangG #1
Need help with something
Hi folks, first time poster here although I've been around the message board
scene for about 5 or 6 years now.
Basicaly I need some help, and, while I hate to ask people I have never even
spoken to before, I'm on a deadline and I've exhausted all of my options.
What it pretty much boils down to is this; I've built, or rather modified, a
page using a dreamweaver template and a cascading style sheet and them combined
them with the existing pages, several of which include ColdFusion operations.
I've been using the same template and css on every page and they all work
fine, except when I try to access the statistics pages. Those pages call
information from a database using a ColdFusion query but keep causing me
problems.
The following is the ColdFusion in use, besides for various <cfoutput> tags;
<cfinclude template="../Connections/connSTEP.cfm">
<cfparam name="URL.cArea" default="1">
<cfparam name="rsCA_EC_AC__MMColParam" default="#URL.cArea#">
<cfquery name="rsCA_EC_AC" datasource=#MM_connSTEP_DSN#
username=#MM_connSTEP_USERNAME# password=#MM_connSTEP_PASSWORD#>
SELECT Econ_Active_Males, Econ_Active_Females, Econ_Active_Total, Maps FROM
CA_EC_AC
WHERE Community_Area = '#rsCA_EC_AC__MMColParam#'
</cfquery>
<cfquery name="rsSUMCA_EC_AC" datasource=#MM_connSTEP_DSN#
username=#MM_connSTEP_USERNAME# password=#MM_connSTEP_PASSWORD#>
SELECT SUM(Econ_Active_Males), SUM(Econ_Active_Females),
SUM(Econ_Active_Total)
FROM CA_EC_AC
</cfquery>
<cfquery name="rsCArea" datasource=#MM_connSTEP_DSN#
username=#MM_connSTEP_USERNAME# password=#MM_connSTEP_PASSWORD#>
SELECT Community_Area FROM CA_by_Age_SNIPVPS99
</cfquery>
I've been able to identify the line which is the problem;
<cfinclude template="../Connections/connSTEP.cfm">
this calls the following;
<!-- FileName="Connection_cf_dsn.htm" "" -->
<!-- Type="CFDSN" -->
<!-- Catalog="" -->
<!-- Schema="" -->
<!-- HTTP="true" -->
<CFSET MM_connStep_DSN = "step">
<CFSET MM_connStep_USERNAME = "">
<CFSET MM_connStep_PASSWORD = "">
when I remove the <cfinclude... the page works absolutely fine except that it
comes up blank. However, when the link is in, the css seems to be completely
ignored, almost as if it doesn't exist and the page, font sizes and spacing
mainly, revert back to defaults.
The following page works fine, the template and CSS are correct, all of the
links work and each of the other pages look fine,
[URL=http://a-web-01.bell.ac.uk/stepnew/Default.htm]clicky[/URL],
until you get to this one,
[URL=http://a-web-01.bell.ac.uk/stepnew/queries/CA_EC_AC.cfm?cArea=Blant
yre]clicky[/URL].
If anyone can see whats wrong with this code, or if they have even just an
inkling of what might be wrong I would greatly appreciate it if they could tell
me, any and all help would be greatly appreciated.
LangG Guest
-
vkunirs #2
Re: Need help with something
Hi
i think when you are including the cfinclude, there may be a chance of
changing the current folder.
then at that time the CSS path may not be correct. then obviously it wont
works.
i too faced this similar problem. but after viweing it in the browser using
view source then i realsed that
its path problem
check it once.
vkunirs Guest
-
LangG #3
Re: Need help with something
Thankyou!
Viewing the source eventualy led me to the problem; the comments on the page
linked to in the <cfinclude> was what was causing the problems, deleting them
solved it.
Thanks again for your help :D
LangG Guest
-
paross1 #4
Re: Need help with something
FYI, if you want to keep the comments in your template, you should use ColdFusion comments <!--- ---> instead of HTML <!-- -->.
Phil
paross1 Guest



Reply With Quote

