sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Theadmin77's Avatar

cfoutput to a htm file? html frames


Question posted by: Theadmin77 (Newbie) on June 9th, 2008 06:25 PM
Currently i have a DEFAULT.htm file that display 2 htm frames , FRAME1.htm and FRAME2.htm.

1.FRAME 1.htm present a form to fill up a sql query and pass info to a "MYQUERY.cfm"
2.MYQUERY.cfm performs query on sql and show results in table on FRAME1.

Is any way i can make that result table to show up on FRAME2.htm instead??

I tried everything and nothing works

Any help will be appreciated

This is the code :
MYQUERY.CFM
Expand|Select|Wrap|Line Numbers
  1.  
  2. <html>
  3. <CFOUTPUT>
  4.  
  5. The item selected is #item#
  6.  
  7. </CFOUTPUT>
  8.  
  9.  
  10. <h1> List of product selected with price </h1><hr>
  11.  
  12. <!--- Step 1: The SQL query to list a subset of columns from supplier table --->
  13. <cfquery name="testing" Datasource="Northwind">
  14. select productid,productname,unitprice,unitsonorder from products
  15. </cfquery>
  16.  
  17. <cfif #testing.recordcount# EQ 0>
  18. No products available. 
  19. <cfelse>
  20.  
  21.  
  22.  
  23. <!--- Step 2-a): Print Column Headings --->
  24.  
  25. <table border="1" cellpadding="1">
  26. <tr>
  27. <td>Productid</td>
  28. <td>ProductName</td>
  29. <td>UnitPrice</td>
  30. <td>UnitsOnOrder</td>
  31. </tr>
  32.  
  33.  
  34. <!--- Step 2-b): Code for outputting retrieved data in table format ---> 
  35. <cfoutput query="testing">
  36. <tr>
  37. <td>#ProductID#</td>
  38. <td>#ProductName#</td>
  39. <td>#UnitPrice#</td>
  40. <td>#UnitsOnOrder#</td>
  41. </tr>
  42. </cfoutput>
  43. </table>
  44. </cfif>
  45. </body>
  46.  
  47. </html>
1 Answer Posted
acoder's Avatar
acoder June 9th, 2008 08:34 PM
Site Moderator - 12,593 Posts
#2: Re: cfoutput to a htm file? html frames

Set the target of the form to frame2. An HTML solution rather than a Coldfusion one.
Reply
Not the answer you were looking for? Post your question . . .
197,042 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,042 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Coldfusion Contributors