cfoutput to a htm file? html frames

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Theadmin77
    New Member
    • Nov 2006
    • 19

    cfoutput to a htm file? html frames

    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.cf m"
    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
    Code:
    <html>
    <CFOUTPUT>
    
    The item selected is #item#
    
    </CFOUTPUT>
    
    
    <h1> List of product selected with price </h1><hr>
    
    <!--- Step 1: The SQL query to list a subset of columns from supplier table --->
    <cfquery name="testing" Datasource="Northwind">
    select productid,productname,unitprice,unitsonorder from products
    </cfquery>
    
    <cfif #testing.recordcount# EQ 0>
    No products available. 
    <cfelse>
    
    
    
    <!--- Step 2-a): Print Column Headings --->
    
    <table border="1" cellpadding="1">
    <tr>
    <td>Productid</td>
    <td>ProductName</td>
    <td>UnitPrice</td>
    <td>UnitsOnOrder</td>
    </tr>
    
    
    <!--- Step 2-b): Code for outputting retrieved data in table format ---> 
    <cfoutput query="testing">
    <tr>
    <td>#ProductID#</td>
    <td>#ProductName#</td>
    <td>#UnitPrice#</td>
    <td>#UnitsOnOrder#</td>
    </tr>
    </cfoutput>
    </table>
    </cfif>
    </body>
    
    </html>
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Set the target of the form to frame2. An HTML solution rather than a Coldfusion one.

    Comment

    Working...