troubleshooting Question

javascript bracket or syntax error

Avatar of Tom Powers
Tom Powers asked on
2 Comments1 Solution533 ViewsLast Modified:
I have a bracket issue or syntax error Please help

<!doctype html>
<meta charset="utf-8">
<title>The Sports Network</title>
<style type="text/css">
.tablecolor {
	background-image: url(Greywall.png);
<script src="" type="text/javascript"></script>
<script type="text/javascript">
 var xmlPath = '.'; // '/xml/nfl/scores/real';
  var xmlGameID = 'AB-3171'; // game id only, _counter.xml will be added in the ajax call
  var counterXml = 0;
  // check extension, include path if needed

 function loadData()
    type: "GET",
    url: xmlPath + "/" + xmlGameID + '_' + counterXml + ".xml",
    dataType: "xml",
    success: function (data)
      var d = $(data);
      var Play = d.find('Play');
    // if ($(Team).attr('ID') == $(Play).attr('DefID')) {
		//  var Team = Team.attr('name') ;
        //    $('#Team').html(Team);
	// }
        if ($(Team).attr('vh') == "A") {
			if ($(Team).attr('ID') == $(Play).attr('DefID')) {
      var Individual_Statistics = d.find('Individual_Statistics[IS_TeamID="' + TeamDefID + '"]');
		$('#imgDL').attr('src', (''+$(Play).attr('DefID')+"_helmet_away.png");	
        if ($(Team).attr('vh') == "H") {
			if ($(Team).attr('ID') == $(Play).attr('DefID')) {
      var Individual_Statistics = d.find('Individual_Statistics[IS_TeamID="' + TeamDefID + '"]');
			$('#imgDL').attr('src', (''+$(Play).attr('DefID')+"_helmet_home.png"));
        //  var idselector = arrIDs[AllStats.nodeName].id;
       //   var nodeStart = arrIDs[AllStats.nodeName].start; // AllStats.nodeName.substr(0, AllStats.nodeName.length - 5); // need the part before Stats
         // $(AllStats).find(Defense + '_Listing').each(function(i2, Defense_Listing){
             $(Defense_Listing).find(Defense + '_PlayerID').text() 
              var Firstname = $(Defense_Listing).find('_Firstname').text();
              var Lastname = $(Defense_Listing).find('_Lastname').text();
              $('#Playername').html(Firstname + ' ' + Lastname);
            //  switch (nodeStart)
              //  case "Defense":
           // each xxx_Listing
  }); //ajax


<table width="800" border="1" class="tablecolor">
    <td width="114" rowspan="4" bgcolor="#FFFFFF"><p align="center"><img src="DL.png" name="imgDL" width="85" height="102" id="imgDL"></p></td>
    <td width="123"><div align="center">Tackles</div></td>
    <td width="122"><div align="center">Assists</div></td>
    <td width="152"><div align="center">Combined</div></td>
    <td width="136"><div align="center" id="Sacks">Sacks</div></td>
    <td width="127"><div align="center">Sack_Yards</div></td>
    <td><div align="center" id="Tackles">Tackles</div></td>
    <td><div align="center" id="Assists">Assists</div></td>
    <td><div align="center" id="Combined">Combined</div></td>
    <td><div align="center" id="Sacks">Sacks</div></td>
    <td><div align="center" id="Sack_Yards">Sack_Yards</div></td>
    <td><div align="center">Interceptions</div></td>
    <td><div align="center">Pass_Deflections</div></td>
    <td><div align="center">Forced_Fumbles</div></td>
    <td><div align="center">Fumbles_Recovered</div></td>
    <td><div align="center">Safties</div></td>
    <td><div align="center" id="Interceptions">Interceptions</div></td>
    <td><div align="center">
      <div align="center" id="Pass_Deflections">Pass_Deflections</div>
    <td><div align="center" id="Forced_Fumbles">Forced_Fumbles</div></td>
    <td><div align="center" id="Fumbles_Recovered">Fumbles_Recovered</div></td>
    <td><div align="center" id="Safties">Safties</div></td>
    <td id="PlayerName"><div align="center" id="PlayerName">PlayerName</div></td>
    <td colspan="5"><div align="center" id="Team">Team</div></td>
var myVar=setInterval(function(){myTimer()},1000);

function myTimer()


Open in new window

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros