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

message scroller

Status
Not open for further replies.

anneoctaaf

Programmer
Dec 15, 2003
104
0
0
NL
Hi,

I want to make a message scroller. I knoe this can easily be done in javascript, but i want the scroller to get the messages/news from a database. Does someone know a script in ASP that does this?

Thanx!
 
It can't be done in ASP, but ASP could write the javascript code and data on to the page from a db.



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Ok, thanx
Getting values out of a DB is not a problem, but how do i pass this to javascript. Can somebody give me a little example?

Thanx!
 
Just write the whole script code and variables onto the page

Code:
with response
.write "<script type='text/javascript'>" & vbCrLf
.write "lines of javascript code and variables go here"
.write "var varname = '"
.write DataFromDB
.write "';" & vbCrLf
' etc etc

.write "</script>" & vbCrLf
end with




Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top