Login | Register | FAQ
Anonymous

PLEASE HELP ME

+ Post a reply

3 posts Page 1 of 1


PLEASE HELP ME

by ryan0521 » Tue May 29, 2018 4:42 am

I have an issue regarding this code and I have this error

500 Uncaught TypeError: Cannot set property 'innerHTML' of null

Code: Select all
function GetClock()
   {
      var tday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
      var tmonth=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
      var d=new Date();
      var nday=d.getDay(),nmonth=d.getMonth(),ndate=d.getDate(),nyear=d.getYear();
      if(nyear<1000) nyear+=1900;
      var nhour=d.getHours(),nmin=d.getMinutes(),nsec=d.getSeconds(),ap;

      if(nhour==0){ap=" AM";nhour=12;}
      else if(nhour<12){ap=" AM";}
      else if(nhour==12){ap=" PM";}
      else if(nhour>12){ap=" PM";nhour-=12;}

      if(nmin<=9) nmin="0"+nmin;
      if(nsec<=9) nsec="0"+nsec;

      $('computerdatetime').text("Computer Date: " + tday[nday] + ", " + tmonth[nmonth] + " " + ndate + ", " + nyear + " " + nhour + ":" + nmin + ":" + nsec + ap)
      document.getElementById('computerdatetime').innerHTML= "Computer Date: " + tday[nday] + ", " + tmonth[nmonth] + " " + ndate + ", " + nyear + " " + nhour + ":" + nmin + ":" + nsec + ap;
      setInterval(GetClock,1000);
      }

      window.onload=GetClock;


the HTML for this script is

Code: Select all
<div class="footer">
         <h3 style="">&copy; 2018</h3>
         <h4 style="">Sample Corporation</h4>
         <h4 style="float: right;">PIS Version 1.72.98.523</h4>
         <h4 style="float: right; margin-right: 15px;" id="computerdatetime"></h4>
         <?php
            $sql = mysql_query("select endofday, endofshift from systemsetup", $connection);
            $result = mysql_fetch_array($sql);
            
            if($result[0] === "1" && $result[1] === "1")
            {
         ?>
         <h4 style="float: right; margin-right: 15px;" id="systemdate">System Date: <?php echo date("F j, Y", strtotime($systemdate[0])); ?></h4>
         <?php } ?>
         <h4 style="float: right; margin-right: 15px; font-weight: bold; text-decoartion: blink;" id="txtprocessingstatus"></h4>
      </div>
User avatar

ryan0521

  • Posts: 1
  • Joined: Tue May 29, 2018 4:37 am

Re: PLEASE HELP ME

by Allenparker323 » Tue Jul 10, 2018 5:26 pm

I read your comment properly and run the code I think your computer should be attacked by virus tats why you didn't do the right things I think you should take a help of Bitdefender update error to solve the issue. I also take a help of this site when I face the same TypeError problem.
User avatar

Allenparker323

  • Posts: 1
  • Joined: Tue Jul 10, 2018 5:20 pm

Re: PLEASE HELP ME

by jhonperker » Tue Aug 14, 2018 8:35 pm

I also find this kind of problem but no one here to sort out this, so I decide to go <Gmail support here I can find all kind of solution which I want to know. You can also go there for help.
User avatar

jhonperker

  • Posts: 2
  • Joined: Sat Aug 11, 2018 11:06 pm


+ Post a reply

Page 1 of 1