Hi There
I have downloaded a script that is supposed to work in IE and Mozilla.
It is working in Mozzilla but not in IE.
The Error message says that the ScrollingContainer has no properties.
I have gone over the code and cant find anything wrong
Please Help
Stanton
Heres the Code
<%@ Language=VBScript %>
<!--#include file="adovbs.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>TimeCode Booking</title>
<style type="text/css">
#ads{
width:730px;
margin-top:10px;
}
#mainContainer{
width:340px;
margin:0 auto;
background-color:#FFF;
border-left:0px solid #000;
border-right:0px solid #000;
border-bottom:0px solid #000;
padding:0px;
background-color:#2c2c2c;
text-align:left;
border:0px solid #000;
background-image: url(Images/Home/subscribe.
gif);
}
#scrollingContainer{
width:340px; /* 170 pixels in width */
height:50px; /* Height of box */
border:0px solid #000; /* Black border around box */
background-color: #2c2c2c; /* Light blue background color */
border-left:0px solid #000;
border-right:0px solid #000;
border-bottom:0px solid #000;
padding:2px; /* A little bit of space between border of box and text inside */
float:right; /* I want the text to wrap around the box */
margin-right:0px; /* Right margin of 10 pixels */
font-size:0.9em; /* Smaller font size than the rest of the page */
overflow:hidden; /* Hide overflow content */
}
#scrollingContent{
width:340px; /* 170 pixels in width */
height:300px; /* Height of box */
border:0px solid #000; /* Black border around box */
background-color: #2c2c2c; /* Light blue background color */
border-left:0px solid #000;
border-right:0px solid #000;
border-bottom:0px solid #000;
}
</style>
<script type="text/javascript">
/*************************
**********
**********
**********
**********
**********
**********
**********
**********
***
(C)
www.dhtmlgoodies.com, November 2005
This is a script from
www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.
Thank you!
www.dhtmlgoodies.com Alf Magne Kalleland
**************************
**********
**********
**********
**********
**********
**********
**********
**********
**/
var slideTimeBetweenSteps = 100; // General speed variable (Lower = slower)
var scrollingContainer = false;
var scrollingContent = false;
var containerHeight;
var contentHeight;
var contentObjects = new Array();
var originalslideSpeed = false;
function slideContent(containerId)
{
var topPos = contentObjects[containerId
]['objRef'
].style.to
p.replace(
/[^\-0-9]/
g,'');
topPos = topPos - contentObjects[containerId
]['slideSp
eed'];
if(topPos/1 + contentObjects[containerId
]['content
Height']/1
<0)topPos = contentObjects[containerId
]['contain
erHeight']
;
contentObjects[containerId
]['objRef'
].style.to
p = topPos + 'px';
setTimeout('slideContent("
' + containerId + '")',slideTimeBetweenSteps
);
}
function stopSliding()
{
var containerId = this.id;
contentObjects[containerId
]['slideSp
eed'] = 0;
}
function restartSliding()
{
var containerId = this.id;
contentObjects[containerId
]['slideSp
eed'] = contentObjects[containerId
]['origina
lSpeed'];
}
//THIS IS WHERE THE ERROR IS HAPPENING
function initSlidingContent(contain
erId,slide
Speed)
{
scrollingContainer = document.getElementById(co
ntainerId)
;
scrollingContent = scrollingContainer.getElem
entsByTagN
ame('DIV')
[0];
scrollingContainer.style.p
osition = 'relative';
scrollingContainer.style.o
verflow = 'hidden';
scrollingContent.style.pos
ition = 'relative';
scrollingContainer.onmouse
over = stopSliding;
scrollingContainer.onmouse
out = restartSliding;
originalslideSpeed = slideSpeed;
scrollingContent.style.top
= '0px';
contentObjects[containerId
] = new Array();
contentObjects[containerId
]['objRef'
] = scrollingContent;
contentObjects[containerId
]['content
Height'] = scrollingContent.offsetHei
ght;
contentObjects[containerId
]['contain
erHeight']
= scrollingContainer.clientH
eight;
contentObjects[containerId
]['slideSp
eed'] = slideSpeed;
contentObjects[containerId
]['origina
lSpeed'] = slideSpeed;
slideContent(containerId);
}
</script>
</head>
<body >
<!--#include file="Topnav.asp"-->
<table width="100%" height="100%" cellpadding=0 cellspacing=0 ID="Table1">
<tr><td height=5></td></tr>
<tr>
<td >
<table cellpadding=0 cellspacing=0 border=0 ID="Table2">
<tr>
<td valign=top width=365 >
<table cellpadding=0 cellspacing=0 class="ContentBG" border=0 ID="Table3">
<tr>
<td align=left width=10 ><IMG SRC="Images/Home/frame_tex
ture/left.
gif" ></td>
<td align=left style="height: 5px; width:80 ; background-image: url(Images/Home/frame_text
ure/mid.gi
f);" ></td>
<td align=right width=10 ><IMG SRC="Images/Home/frame_tex
ture/right
.gif" ></td>
</tr>
<tr >
<td ></td>
<td height=20>
<Font class="HeaderFont">TIMECOD
E ARTISTS</Font>
</td>
<td ></td>
</tr>
<tr >
<td></td>
<td width=100% background="Images/Home/un
derline_pi
xel.gif" height=3></td>
<td ></td>
</tr>
<tr >
<td width=5></td>
<td height=177 valign=top >
</td >
<td ></td>
</tr>
<tr >
<td ></td>
<td height=20>
<Font class="HeaderFont">ARTISTS
SCHEDULE</Font>
</td>
<td ></td>
</tr>
<tr >
<td></td>
<td width=100% background="Images/Home/un
derline_pi
xel.gif" height=3></td>
<td ></td>
</tr>
<tr >
<td width=5></td>
<td align="left" height=69 >
<div id="mainContainer" >
<div id="scrollingContainer" >
<div id="scrollingContent" >
<table cellpadding=0 width=100% cellspacing=0 >
<tr>
<td ></td>
<td height=20></td>
<td></td>
</tr>
<%
DIM intCnt
strSql = "SELECT Artists.strAlias, Bookings.datDate, Bookings.strCountry, Bookings.strCity" &_
" FROM Bookings INNER JOIN Artists ON Bookings.intArtistsID = Artists.intArtistsId;"
Set rsBookings = conn.execute(strSql)
While Not rsBookings.EOF
%>
<tr>
<td width=20 align=left><IMG SRC="Images/Home/bullet.gi
f"></td>
<td><%=FormatDateTime(rsBo
okings("da
tDate"),vb
LongDate)%
></td>
<td><%=rsBookings("strCoun
try")%> - <%=rsBookings("strCity")%>
</td>
</tr>
<tr>
<td width=10></td>
<td><font class=botnavon><%=rsBookin
gs("strAli
as")%></fo
nt></td>
<td> </td>
</tr>
<%
rsBookings.movenext
Wend
rsBookings.Close
set rsBookings=nothing
%>
</table>
</div>
</div>
</div>
</td >
<td ></td>
</tr>
<tr>
<td align=left width=10 ><IMG SRC="Images/Home/frame_tex
ture/left.
gif" ></td>
<td align=left style="height: 5px; width:80 ; background-image: url(Images/Home/frame_text
ure/mid.gi
f);" ></td>
<td align=right width=10 ><IMG SRC="Images/Home/frame_tex
ture/right
.gif" ></td>
</tr>
</table>
</td>
<td width=20> </td>
<td width=379 valign=top align=right height=100 >
</td>
</tr>
</table>
</td>
</tr>
<tr><td height=5></td></tr>
</table>
<script type="text/javascript">
initSlidingContent('scroll
ingContain
er',3);
</script>
<!--#include file="footer.asp"-->
</body>
</html>