Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
ccsimmons #1
Includes with querystrings
I need to include 3 files that have grabbed database info using a parameter
passed in their querystrings. I keep getting a 'file not found' error when I
do the include with a querystring like so:
<cfinclude template="Part1.cfm?dbid=100">
<cfinclude template="Part2.cfm?dbid=100">
<cfinclude template="Part3Local.cfm?dbid=100">
Is there another way to do this?
ccsimmons Guest
-
Help w/ Includes & CSS
for some reason after I upgraded from MX 2004 to DreamWeaver 8, my site doesn't doesn't format with the style sheet i used previously in 2004. Also... -
Querystrings in HTML/javascript
Hi I am passing a querystring to a html page as I would to say an asp page, so http://www.mysite.com/mypage.html?thepopup=page2.html I want... -
query about querystrings
I've been building an Intranet app; and have used hidden fields exclusively to pass one or two things from one page to another. However, now I... -
Includes...
as you said... put the data in a page and use the INCLUDE command -- ---------------------------------------------------------- Curt... -
XP includes ???????
ah, ok, thanks -
Adam Cameron #2
Re: Includes with querystrings
On Wed, 23 Feb 2005 15:17:51 +0000 (UTC), ccsimmons wrote:
You don't need or want a querystring when you're including a file. A query> I need to include 3 files that have grabbed database info using a parameter
> passed in their querystrings. I keep getting a 'file not found' error when I
> do the include with a querystring like so:
>
> <cfinclude template="Part1.cfm?dbid=100">
string is for an HTTP request. <cfinclude> doesn't perform its own HTTP
request, it simply includes (big hint there) the contents of the included
file into the including file (*).
Just set the variables in the including file, and use them in the included
file.
[url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p63.htm[/url]
[url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p70.htm[/url]
--
Adam
(*) It's not quite that straight forward or transparent, but for the
purposes of this question, that's what it does.
Adam Cameron Guest
-
cf_menace #3
Re: Includes with querystrings
Alternately, you can use <cfmodule> to "include" the file:
<cfmodule template="Part1.cfm" dbid="100">
Just know that using <cfmodule> is like calling a custom tag. Therefore in
"Part1.cfm", you'd have to check for attributes.dbid instead of url.dbid
HTH
cf_menace Guest



Reply With Quote

