View Full Version : Inserting data from a SQL database into Marquee script 655533

10-22-2010, 12:17 PM
Hi, I am using the "Cross browser Marquee script- � Dynamic Drive (www.dynamicdrive.com). This works very well, but I want to insert some information from a database NAME field into the marque. Below is what I tried but it does not bring in the data. I am using an include statement. The data will display outside if the Marquee but not within.

<!--#Include virtual="/stateattorney/_code/DBconnect/DBC-Office.inc"-->

' ************************************* Start ASP Application **********************
dim myConnection
dim connectString
dim rsList
dim Name

Set myConnection = Server.CreateObject ("ADODB.Connection")
Set rsList = Server.CreateObject ("ADODB.Recordset")

myConnection. Open connectString

sqlQuery = "Select * From tblIncludeBanner Order by Name"

Set rsList = myConnection.Execute(sqlQuery)

<div align="center">

<table class="style1" style="width: 100%">
<td style="width: 100%">

<script language="JavaScript1.2">

Cross browser Marquee script- � Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact

//Specify the marquee's width (in pixels)
var marqueewidth="1000px"
//Specify the marquee's height
var marqueeheight="30px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//configure background color:
var marqueebgcolor="#e8f2f7"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
//link reference <a href="/stateattorney/Underconstruction.htm">

var marqueecontent='<nobr><font face="Arial"><font size="4"><font color="blue"> (<%=rsList("Name")%>) This is a test banner.....<a href="../../../newsmanager_deploy/NewsViewer.aspx"></a></font></font></font></nobr>'