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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling Contents of a query

Status
Not open for further replies.

nsukari

Technical User
Jul 17, 2002
26
0
0
US
I have a query that produces a list of people from an access DB. THe query is very simple and is working, but the problem is that I need to be able to display the contents of this query on a web page as a continuously scrolling list. I have not been able to figure this out. I have tried to use javascript for the scrolling, but if there is a method in CF, I would appreciate the help.

Here is my very simple query code:

<CFQUERY DATASOURCE=&quot;birthdays&quot; NAME=&quot;bviewer&quot;>
SELECT * FROM birthdays
</CFQUERY>

<CFOUTPUT query=&quot;bviewer&quot;>
#Name# - #DateFormat(DOB,&quot;mmmm d&quot;)#<br>
</cfoutput>
 
I'm not sure what you mean by a &quot;continuously scrolling list&quot;. Can you be more specific? Perhaps you mean a multiple select box within a form?

-Tek
 
No, I mean scrolling. Like I have a list of 20 names, but the area is big enough for 10. The names continuously cycle from 1-20 and then start over again. Like a moving billboard. I have done this in javascript and it works great, but not with the CF query. I don't want to have to retype my JS list every week to have an up-to-date list.
 
Take your static JavaScript function that scrolls thru. the list and make it dynamic.

<CFOUTPUT query=&quot;bviewer&quot;>
#Name# - #DateFormat(DOB,&quot;mmmm d&quot;)#<br>
</cfoutput>

Inside your JS function set a JavaScript variable equal to what you need from your CF query. or just output its value inside the function.

<SCRIPT LANGUAGE = &quot;JavaScript&quot;>

function YourFunction(){
Your_JavaScript_Var = #Your_ColdFusion_Var#;
.
.
.

}

</SCRIPT>


If you need more help post your JS Function.

Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top