Connecting Tech Pros Worldwide Help | Site Map

cfoutput to a htm file? html frames

Newbie
 
Join Date: Nov 2006
Posts: 19
#1: Jun 9 '08
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>
  48.  
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Jun 9 '08

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