Build Master/Detail page in ColdFusion

Build a dynamic Master/Detail Page in ColdFusion. Tutorial assumes no prior knowledge of ColdFusion. Happy programming! UDnewbie.com



ColdFusion Master/Detail Pages

Page 1, Page 2, Page 3

1. Create a new page and Save it AS Details.cfm.
Note when we mentioned earlier how to retrieve variables from the queryString using #URL.CFvariable#

2. Make our Recordset but filter the SQL statement to find the CatID in the Details table equal to the CatID in the QueryString passed.

<cfquery name="rsDetails datasource="udnewbie">

SELECT SubCatID, SubCatTitle, CatID
FROM tblSubCat
WHERE CatID = #URL.CatID#

</cfquery>

note: Recall that CatID is of datatype number, it it was a string we would surround it with single quotes like '#URL.CFVariable#'


3. We have successfully created our filtered Recordset, all we need to do now is display our SubCatgory Titles. you should know how to do this from part 1.
Within our body tags we will type:

<cfoutput query="rsDetails">

#rsDetails.SubCatTitle#<br>

</cfoutput>


4. View your master page through the browser and click a link.


Happy Programming!


If you have any problems with the tutorial, just drop me an email or post a comment.
Omar Elbaga
http://www.UDnewbie.com

If you are further enticed by ColdFusion, you might like to try a couple of CF Newsgroups like CFTalk news://fuseware.com/cf-talk or Jag's CF NG news://ls.magicfind.com/mb-cf. Also see Patty's CF resources. You will also find plenty of CF Extensions for Ultradev at http://www.massimocorner.com and http://www.basic-ultradev and there is much more.

Omar Elbaga

Starting out as a fine artist, Omar Elbaga gradually moved to computer graphic arts. He was particularly amazed by the power of the World Wide Web, so he embarked upon building small-scale sites for fun utilizing HTML and his Art background. Falling in love with designing web pages and its potential, he began a career in web design. Omar has since been in the web development field for several years. With his head in computer books nearly 24 hours a day, Omar moved on to enhance his skills from web design to web programming.

Most of his work involves building database-driven web sites for small companies. Omar is currently running a popular Dreamweaver MX resource site named dmxfire.com

See All Postings From Omar Elbaga >>

Comments

Be the first to write a comment

You must me logged in to write a comment.