Click to See Complete Forum and Search --> : Scrolling text freezes in FF when using doctype


Foundas
10-14-2005, 11:35 AM
Hey all,

i have this news ticker:

--------------------------------------------------------------------------
<%
Set conCurrent = CreateObject("ADODB.Connection")
Set rstCurrent = Server.CreateObject("ADODB.Recordset")
conCurrent.Open "Driver={Microsoft Access Driver (*.mdb)};" & "DBQ=C:\database\news.mdb"
strSQL = "SELECT * FROM news ORDER BY Entry_Date DESC"
Set rstCurrent = conCurrent.Execute(strSQL)
sHtml1 = "<P><CENTER><FONT SIZE='-1' COLOR='000000'>"
sHtml2 = "<A HREF='newsdetail.asp?ID="
sHtml3 = "'>"
sHtml4 = "</A></FONT></CENTER></P>"
sTxt = ""
rstCurrent.movefirst
do while not rstCurrent.eof
sTxt = sTxt & sHtml1 & rstCurrent("Entry_Date") & " - " & sHtml2 & rstCurrent("Entry_ID") & sHtml3 & rstCurrent("Title") & sHtml4
rstCurrent.movenext
loop
iSpeed = 40 ' Speed of Marquee (higher = slower)
iTop = 0 ' Y Location Within Object
iLeft = 0 ' X Location""""
iWidth = 140 ' Width
iHeight = 190 ' Height
'Insert marquee into objects innerHtml Property (in this Case a table cell)
sMarquee="<MARQUEE onmouseover='this.stop();' " & "onmouseout='this.start();'direction='up' scrollamount='1' " & "scrolldelay='" & iSpeed & "' top='" & iTop & "' left='" & iLeft & "' width='" & iWidth & "' height='" & iHeight & "'>" & sTxt & "</MARQUEE>"

conCurrent.close
set conCurrent = Nothing
%>

<CENTER><H1>Ticker!</H1></CENTER>
<P>&nbsp;</P>
<table style="border-left: 1 solid #000000;border-right: 1 solid #D0D5DF;border-top: 1 solid #000000; border-bottom: 1 solid #D0D5DF" bgcolor=white width=125 height=167 cellpadding="2" cellspacing="0" align="center">
<tr>
<td width="iWidth" height="166" bgcolor="#FFCC00" id="tDisplay" bordercolor="#3333FF">
<%=sMarquee%> </td>
</tr>
</table>
--------------------------------------------------------------------------

it reads the fields of the news.mdb and displayes them.


It works great with IE6 and with FF but the problem i am facing is this:

when this code is saved as news.asp and you open the page as standalone, in IE6 and FF, it works.

but when i use the
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
in the header file, the text doesnt scroll in FF. If i remove the doctype, the text scrolls but i get sort of errors in IE with my drop down menus and tables


How can i fix this problem without removing a doctype?

thnaks in advance,

Harry