Problem with Screen Flash
I have built a page dynamically using JavaScript and some OEM ActiveX controls.
Basically, it is several tables that display numeric values as text. In one of the tables, I have need to display the date and time of the PC, so I added the DIV tag and assigned it a name. So every second I call a routine that builds the date time string that I then write to the DIV tag using innerhtml.
That all works great!
The problem is, I would say 70% of the time (7 of 10 seconds), the whole screen kind of flashes like the whole screen is being redrawn. I think this is a result of updating the time because I can disable that code and the flashing stops. However, if you watch it say for 3 of 10 seconds the pc date and time update but the screen didn't flash.
I am at a loss here, don't have a clue what is causing this.
Any help would be appreciated!
Re: Problem with Screen Flash
Would using php to retrieved the time/date help?
Re: Problem with Screen Flash
Quote:
Originally Posted by
Nightwalker83
Would using php to retrieved the time/date help?
Not if you want the time/date of the "client", and not the "server".
Re: Problem with Screen Flash
What are you doing that would required the time to be updated every second?
Re: Problem with Screen Flash
This is a page that is part of an interface between a pc (laptop) and a PLC or Programmable Logic Controller. The purpose of the interface is to allow the user to monitor whatever process the PLC is controlling and allow the user to make modifications to the configuration and the like.
In this case, I am displaying the date & time retrieved from the PLC and comparing it to the date & time of the PC. The date & time from the PLC is being retrieved by an OEM activeX control that communicates serially with the PLC. I am building a string that represents the data & time in javascript and then displaying it within a cell of a table.
This allows the user to see if the date & times of each device match, or are close ... Since the PLC date & time updates every second, I need to update the PC time every second.