Be seen. Boost your question’s priority for more expert views and faster solutions
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">
body {
background-color: #000;
}
#apDiv1 {
position: absolute;
width: 619px;
height: 376px;
z-index: 10;
left: 75px;
top: 15px;
}
.apdivtbheader {
color: #FFF;
}
.centermid {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 16px;
font-weight: bold;
color: #000;
text-align: center;
vertical-align: middle;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var xmlPath = '.' //'/xml/nba/scores/real';
var xmlGameID = '18673';
function loadData() {
$.ajax({
type: "GET",
url: xmlPath + "/" + xmlGameID + ".xml",
dataType: "xml",
success: function (data) {
var d = $(data);
var Play = d.find('Play');
var msg;
var inn = Play.attr('TimeLeft');
var playtype1 = Play.attr('PlayType');
msg = Play.find('narrative').attr('text');
$('#txtgameplay').html(msg);
$('#txttimeleft').html(inn);
$('#txtplaytype').html(playtype1);
//convert the XML into a jQuery object
gameData = $(data);
//Get the Players node
players = gameData.find('Players');
//Now loop through each Player in the Players node
$('Player', players).each(function(i, player) {
//Output some of the attributes for this player
// if (player.size() > 0) {
//$.each(players,function(i,player) {
player=$(player);
var tid = player.attr('TeamID');
var pid = player.attr('ID');
var pts = player.attr('Points')
var assists = player.attr('Assists')
$('#txtpoints').html(pts);
// $("#players").append(li);
$('txtassists').html(assists);
$('#imgcenter').attr('src', 'http://dev.sportsnetwork.com/aspdata/nhl2/NBA/Images/NBAlOGOSZ/'+ tid +".png");
var txt;
$('#imgplayer').attr("src","http://images.sportsnetwork.com/bask/nba/atthecourt/players/" + pid + ".jpg");
txt = " " +
player.attr("FirstName") + " " +
player.attr("Lastname") + ", " +
player.attr("Pos");
// getStats(player,txt,img,li);
// }
// });
});
}
});
}
</script>
</head>
<body>
<table width="750" border="0">
<tr>
<td><div align="center">
<div id="apDiv1">
<table width="650" border="0">
<tr class="apdivtbheader">
<td width="121" bgcolor="#0099CC"><div align="center"></div></td>
<td width="114" bgcolor="#0099CC"><div align="center"><strong>TimeLeft</strong></div></td>
<td width="122" bgcolor="#0099CC"><div align="center"><strong>PlayType</strong></div></td>
<td width="120" bgcolor="#0099CC"><div align="center"><strong>Points</strong></div></td>
<td width="120" bgcolor="#0099CC"><div align="center"><strong>Assits</strong></div></td>
</tr>
<tr class="apdivtbheader">
<td height="82" class="centermid"><p><img src="Images/misc/player.jpg" name="imgplayer" width="60" height="80" id="imgplayer"></p></td>
<td class="centermid" id="txttimeleft"></td>
<td class="centermid" id="txtplaytype"></td>
<td class="centermid" id="txtpoints"></td>
<td class="centermid" id="txtassists"></td>
</tr>
</table>
<table width="120" border="0">
<tr>
<td><p class="centermid"><img src="Images/NBAlOGOSZ/093.png" name="imgcenter" width="133" height="117" id="imgcenter"></p></td>
</tr>
</table>
<table width="300" border="0">
<tr>
<td height="18" id="txtgameplay"><p class="centermid" id="txtgameplay"> </p>
<p> </p></td>
</tr>
</table>
</div>
<img src="Images/Courts/096.png" width="625" height="375"></div></td>
</tr>
</table>
<script>
var myVar=setInterval(function(){myTimer()},1000);
function myTimer()
{
loadData();
}
</script>
</body>
</html>
Court3.htmlAre you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Join the community of 500,000 technology professionals and ask your questions.