susie123
11-29-2007, 09:47 AM
Hi. I have a script that worked last week and this week doesnīt want to!!! Can anybody please have a look and tell me where the error is, if any, or if itīs my pc? Many thanks for your help.
<script language=JavaScript>
function flags()
{
var filter = "Team = "+team.value;
teamLogo.src = "images\\"+team.value+".jpg";
teamlist.Filter = filter;
teamlist.reset();
}
function backwardClick()
{
if (teamlist.recordset.AbsolutePosition > 1)
{
teamlist.recordset.MovePrevious();
flags();
}
else
{
alert("Beginning of team list.");
}
}
function forwardClick()
{
if (teamlist.recordset.AbsolutePosition != teamlist.recordset.RecordCount)
{
teamlist.recordset.MoveNext();
flags();
}
else
{
alert("End of team list.");
}
}
</script>
</head>
<body onload="flags()" bgcolor="#99ffcc">
<font face="verdana,arial,helvetica" color="#3300ff">
<center>
<h2>WORLD SWIMMING CHAMPIONSHIPS 2007</h2>
<h3>Individual Swimmer Statistics</h3>
<hr width="650pt" color="#3333ff">
<p>Click the buttons below to see who won races for your country this year.</p>
<p>
<object id="teamlist" classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
<param name="DataURL" value="indivSwimStats.txt">
<param name="UseHeader" value="True">
</object>
<img id="teamLogo" src="images\Great Britain.jpg" border=2 height=60 width=77 align=center alt="Team's Flag">
<br>
<table>
<tr>
<td align=right> <input type=button id=backward value=" < " onclick="backwardClick()">
</td>
<td align=left> <input type=button id=forward value=" > " onclick="forwardClick()"></td>
</tr>
</table>
<table width="85%" bgcolor="#ccffcc" border="1" align=center cellspacing=1 cellpadding=5 id="results" datasrc="#teamlist">
<THEAD>
<TR>
<TD><DIV ID="team"><B>Team</B></DIV></TD>
<TD width="5%"><DIV ID="Total"><center><B>Total races won</B></center></DIV></TD>
<TD width="20.5%"><DIV ID="Name2"><B>Freestyle</B></DIV></TD>
<TD><DIV ID="Name3"><B>Backstroke</B></DIV></TD>
<TD><DIV ID="Name4"><B>Butterfly</B></DIV></TD>
<TD width="18%"><DIV ID="Name5"><B>Relay</B></DIV></TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD><DIV DATAFLD="team"></DIV></TD>
<TD align="center"><DIV DATAFLD="Total"></DIV></TD>
<TD><DIV DATAFLD="Name2"></DIV></TD>
<TD><DIV DATAFLD="Name3"></DIV></TD>
<TD><DIV DATAFLD="Name4"></DIV></TD>
<TD><DIV DATAFLD="Name5"></DIV></TD>
</TR>
</TBODY>
</table>
Look forward to hearing from you. Thanks again.
:)
<script language=JavaScript>
function flags()
{
var filter = "Team = "+team.value;
teamLogo.src = "images\\"+team.value+".jpg";
teamlist.Filter = filter;
teamlist.reset();
}
function backwardClick()
{
if (teamlist.recordset.AbsolutePosition > 1)
{
teamlist.recordset.MovePrevious();
flags();
}
else
{
alert("Beginning of team list.");
}
}
function forwardClick()
{
if (teamlist.recordset.AbsolutePosition != teamlist.recordset.RecordCount)
{
teamlist.recordset.MoveNext();
flags();
}
else
{
alert("End of team list.");
}
}
</script>
</head>
<body onload="flags()" bgcolor="#99ffcc">
<font face="verdana,arial,helvetica" color="#3300ff">
<center>
<h2>WORLD SWIMMING CHAMPIONSHIPS 2007</h2>
<h3>Individual Swimmer Statistics</h3>
<hr width="650pt" color="#3333ff">
<p>Click the buttons below to see who won races for your country this year.</p>
<p>
<object id="teamlist" classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
<param name="DataURL" value="indivSwimStats.txt">
<param name="UseHeader" value="True">
</object>
<img id="teamLogo" src="images\Great Britain.jpg" border=2 height=60 width=77 align=center alt="Team's Flag">
<br>
<table>
<tr>
<td align=right> <input type=button id=backward value=" < " onclick="backwardClick()">
</td>
<td align=left> <input type=button id=forward value=" > " onclick="forwardClick()"></td>
</tr>
</table>
<table width="85%" bgcolor="#ccffcc" border="1" align=center cellspacing=1 cellpadding=5 id="results" datasrc="#teamlist">
<THEAD>
<TR>
<TD><DIV ID="team"><B>Team</B></DIV></TD>
<TD width="5%"><DIV ID="Total"><center><B>Total races won</B></center></DIV></TD>
<TD width="20.5%"><DIV ID="Name2"><B>Freestyle</B></DIV></TD>
<TD><DIV ID="Name3"><B>Backstroke</B></DIV></TD>
<TD><DIV ID="Name4"><B>Butterfly</B></DIV></TD>
<TD width="18%"><DIV ID="Name5"><B>Relay</B></DIV></TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD><DIV DATAFLD="team"></DIV></TD>
<TD align="center"><DIV DATAFLD="Total"></DIV></TD>
<TD><DIV DATAFLD="Name2"></DIV></TD>
<TD><DIV DATAFLD="Name3"></DIV></TD>
<TD><DIV DATAFLD="Name4"></DIV></TD>
<TD><DIV DATAFLD="Name5"></DIV></TD>
</TR>
</TBODY>
</table>
Look forward to hearing from you. Thanks again.
:)