Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TABLE to scroll horizontally for Cfoutput query 2

Status
Not open for further replies.

Albert3162

Programmer
Jul 13, 2001
18
US
Hi there experts,

I need to display a TABLE (24 columns) that contains output from cfquery.

I would like the TABLE to scroll horizontally and left part of this table should be static (3 or 5 columns) rest columns horizontal scrollable.
Any ideas would be greatly appreciated and the solution handsomely rewarded :)

Regards,
Albert
 
I'd suggest pointing this in the Javascript or HTML forums.

While this will use output from a Coldfusion script, the question itself isn't anything to do with Coldfusion.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
To a degree that's true. The horazontal scroll thing is going to be html/css/javascript.

however you're going to need to know how to flip your table horizontally, and that's CF.

Code:
<cfoutput>
<table>
<tr>
<td>
heading
</td>
<cfloop from = "1" to = "yourQuery.recordCount" index = "rowNum">
<td>
#yourQuery.firstCol[rowNum]#
</td>
</cfloop>
</tr>

<tr>
<td>
heading 2
</td>
<cfloop from = "1" to = "yourQuery.recordCount" index = "rowNum">
<td>
#yourQuery.secondCol[rowNum]#
</td>
</cfloop>
</tr>

<tr>
<td>
heading 3
</td>
<cfloop from = "1" to = "yourQuery.recordCount" index = "rowNum">
<td>
#yourQuery.thirdCol[rowNum]#
</td>
</cfloop>
</tr>
</table>
</cfoutput>

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
you never make a report that scrolls down?

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Not trying to pick a fight but I've seen some goofy requirements from customers. Usualy due to the spreadsheets these people use are HUGE and scrolling left and right is acceptable/required.

Usualy I agree, try to keep your data in one page, at least horizontially. But I've run into instances where a customer wants certian data on the page that would only fit horizontally if they had two monitors at 1024x768...

I'll warn them that it wont all fit but they don't care. "I'll scroll"

or they want something like this instance where they have

Start | 1 | 4 | 5 | ... ... ---> keep scrolling
End | 4 | 2 | 8 | ... ...
-------------------------------------------------
Diff | 3 | -2| 3 | ... ...

and that's how they want to see it, all on one page. scrolling isn't an issue becaus that's the way they want it.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
you support your users and i'll educate mine
try that in the government :|

but I'm game. educate me. :)

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top