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
-
-
<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>
1
Answer Posted
Set the target of the form to frame2. An HTML solution rather than a Coldfusion one.
|
|
|
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.
Top Coldfusion Contributors
|