2 pages are involved I changed the <a
href="reference_action.cfm?topics=#GetReferences.topic#">#topic#<br /> in
reference.cfm and it goes to the action page, but I am not receiving. For
example if I click on link #1 it goes to the action page, but does not show the
data from the cf loop. i will be put the code here, as I made some changes
code #1 (reference.cfm) this code works fine
<cfparam name="URL.getTopic" default="1">
<cfquery name="GetReferences" datasource="#REQUEST.dataSource#">
SELECT *
FROM reference
ORDER BY topic
</cfquery>
<h1><strong>References</strong></h1>
<cfoutput query="GetReferences" group="topic" groupcasesensitive="no">
<a
href="reference_action.cfm?topics=#GetReferences.topic#">#topic#<br /><br />
</cfoutput>
the page I am having problens with(not showing data) is
reference_action.cfm(not working)
<cfparam name="URL.getTopic" default="1">
<cfquery name="GetReferences" datasource="#REQUEST.dataSource#">
SELECT *
FROM reference
WHERE topic = <cfqueryparam value="#URL.getTopic#"
cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<h1><strong>Topics</strong></h1>
<cfloop query="GetReferences">
<cfoutput>
#reference# <br />
<a href="#reference_link#">#reference_link#</a> <br /><br />
</cfoutput>
<hr>
</cfloop>
Thanks,
John
> Hi, I am trying to make a application where one page as a list(I got
> this working, code #1), but when you click on one of the links, I want
> it to display topic areas defined in the database. Any help on this
> would be great.
> thanks,
> John
>
> code #1(works)
> <!--- reference.cfm --->
> <cfparam name="URL.getTopic" default="1">
> <cfquery name="GetReferences" datasource="#REQUEST.dataSource#">
> SELECT *
> FROM reference
> ORDER BY topic
> </cfquery>
>
>
> <h1><strong>References</strong></h1>
> <cfoutput query="GetReferences" group="topic"
> groupcasesensitive="no">
> <a href="reference.cfm?topics=#GetReferences.topic#">#topic#<br
> /><br />
> </cfoutput>
>
> code #2 (Does Not Work)
> <!--- reference_action.cfm --->
> <cfparam name="URL.getTopic" default="1">
> <cfquery name="GetReferences" datasource="#REQUEST.dataSource#">
> SELECT *
> FROM reference
> WHERE topic = <cfqueryparam value="#URL.getTopic#"
> cfsqltype="CF_SQL_VARCHAR">
> </cfquery>
>
>
>
> <h1><strong>Topics</strong></h1>
> <cfloop query="GetReferences">
> <cfoutput>
> #reference# <br />
> <a href="reference_link#">#reference_link#</a> <br /><br />
> </cfoutput>
> <hr>
> </cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5290
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm