x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Improved MP900 Date/Time clock using HTML

1 2
joval Page Icon Posted 2019-06-26 3:31 PM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Thanks to help from C:Amie on the javascripting, here is a very useful, customizable Day/Date/Time clock for the MP900c (or newer hpc's) based on HTML. I use the browser in fullscreen mode <crtl T> and you can vary the text size using view option. If you convert the file from htm to txt, you can further change colors and sizes, etc.

Who says an old dog can't learn new tricks. Put those Huskies to work!



Attachments
----------------
Attachments A+++clockHPC.htm (1KB - 15 downloads)
 Top of the page
joval Page Icon Posted 2019-07-01 1:46 AM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
This version will render on Internet Explorer 11 with Day of Week and Month in text not numbers...the same way it appears on the MP900c.

(I just simplified the code some so you can more easily change colors, sizes, etc in the style section if you open it with notepad)

Edited by joval 2019-07-01 2:13 AM




Attachments
----------------
Attachments A+Italic_clockHPC -IE11.htm (1KB - 6 downloads)
Attachments A+++clockHPC for IE11.htm (1KB - 9 downloads)
 Top of the page
joval Page Icon Posted 2019-08-02 3:17 PM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Because I am finally putting my MP900c's to work after many years of gathering dust...I am finding they are rather ideal for learning java script...something new for me. And although the MP900c is HTML 4 based instead of the latest 5.0 version for most part it remains powerful since most of the changes between the two involve media streaming functionality. Similarly, Javascript's newest version contains some new bells and whistles...but the basics remain the same. Thus, the HPC's such as the MP900 provide a nice compact avenue for learning these languages.

As a result, as one learns the coding methods and functions...using javascript to change CSS styles on an HTML date/time clock...it becomes clear and somewhat exciting to sit back and imagine what is possible. Along these lines, I will evolve my web page based clock into one where there will be radio buttons that will use the touch screen and change the colors and font sizes and page contents with a simple click...or at least that is the challenge I am setting for myself. I like the fact that as I learn the coding, I can benefit from having the MP900c provide me with something useful...the Date/Time clocks around the house are up and running 24/7 and superior to any others I have.

Edited by joval 2019-08-02 3:17 PM
 Top of the page
joval Page Icon Posted 2019-08-27 6:04 AM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
I am working on another DateTime display version using the javascript "setInterval" method...it seems more compact. In addition using the If/else conditional statements, I will have it change styles to appear darker colors with high contrast at night, and brighter colors for day. I motivates me to learn javascript HTML DOM.

C:Amie I see that the Cmonex Rom for the mp900c has included the World clock all these years (12) and has many features and customizations...Funny me, I never looked at it until a few days ago and it is quite good for example listing the calender and also alarm settings, font and color changes.
 Top of the page
C:Amie Page Icon Posted 2019-08-27 1:41 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
I think that it was part of the .net base ROM wasn't it?

Good idea having day and night settings. I would still encourage you to do something to inhibit screen burn by shuffling positions around as well as colours.
 Top of the page
joval Page Icon Posted 2019-10-10 12:17 AM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
CAmie: yes, I see the World Clock was part of the mobilepro 900c stock software...funny all these years and I never really used it...many nice features but limited to WincCE.

Regarding screen burn in, you are partly correct. After running my Date/Time clock program for several months, 24/7 on an 900c, there is a faint lighter/whiter area that shows up, especially noticed on white screen with high contrast settings. It appears to be partly reversible over time, yet after 2 weeks can still be seen somewhat. It's nothing like a plasma tv or an OLED burn it...which are obvious and usually irreversible from what I have heard. (Now that I have noticed that pseudo -burn in effect, I see a similar effect on another mp900c...center screen...looks like a previous owner had a logo on the page sort of burned in). I'll try to include some photos later just to prove you were barking up the right tree.

SO, all the more important to alternate the image. I have written code for a date/time clock that changes its appearance from dark letters on light background for daytime, and light letters on dark background for nighttime. Time will tell, ha ha, if that is enough of a fix...but it should help.

Edited by joval 2019-10-10 12:21 AM
 Top of the page
C:Amie Page Icon Posted 2019-10-13 9:46 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
The other thing you can do is randomise the location of the parent container in CSS to wear-level it.

I'm not sure how much of the API it supports. I imagine that if you convert the container to
position: fixed;
and it accepts it, you can just bump it around using
top: #px; left: #px;
which in native JavaScript would be
var elm = document.getElementById('my_id'); 
elm.style.left = '#px';
elm.style.top = '#px';


You could move the container say every hour to a random location within the bounding rectangle.
 Top of the page
joval Page Icon Posted 2019-11-09 3:59 PM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Hmmm, time flies...I have been running this version of Date time clock with changing color styles as a function of daytime vs nighttime vs twilight. Colors and fonts, etc can easily be changed by opening the css files in notepad for instance. I used inverse colors between day and night to reduce any pseudo burn it...which after a month of so is nearly imperceptible. Note that on the mp900 and J720 with html 4.0 the date shows the weekday, and month in word form not numeric form as on current browsers.

In this version, place all the downloaded files in the same folder. Originally all the CSS files were placed in a \stylesheet subfolder and the href paths in the html file was href="stylesheet/day.css" , so you can set it up in this better format if you make those changes for each css sheet.

There is a morning and evening twilight style included. To reduce code complexity, the CSS changes are activated by the hourly refresh tag in the header...which may cause some lag on CSS changes...you can customize this to your liking from hourly to 15 minutes to tighten things up.

Next stop: the Twilight Zone. Well, not really...but I will work next on a clock that changes style colors hourly throughout the daylight hours. And then I will add images in the background that change or move. See, there is no end to this nonsense!

Edited by joval 2019-11-09 4:13 PM




Attachments
----------------
Attachments Clock_changeCSS.htm (1KB - 5 downloads)
Attachments day.css (0KB - 2 downloads)
Attachments night.css (0KB - 2 downloads)
Attachments twilight.css (0KB - 3 downloads)
 Top of the page
C:Amie Page Icon Posted 2019-11-09 4:37 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
I still think that you should aim to do it without the meta refresh
 Top of the page
joval Page Icon Posted 2019-11-09 5:09 PM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Quote
I still think that you should aim to do it without the meta refresh


True, but my aim is to make it easy for noobies. This is after all a very simple noobie type undertaking using the stock web browser...and easy for them to change to their liking. The javascript code to achieve the more elegant goal you speak of is...much larger and IMO, complicated.

Likewise, I believe I can write code for the J720 using the same approach, haven't tired it yet. Javascript doesn't work on J720, only vbscript...so the meta refresh is the cheapest trick that should work. I need to try that out on the J720 and get back to you.

Further, a refresh once an hour or half hour is essentially not noticeable.

Point is, you can do so much more in customizing the appearance of the clock than any of the wince versions (allthough I have no alarm option as of yet). I'm just trying to find an everyday use for the multiple HPC's I have.
 Top of the page
joval Page Icon Posted 2019-11-10 3:09 PM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Cmonex, just to let you know, I am grateful for all your suggestions.such as:

var elm = document.getElementById('my_id';  
elm.style.left = '#px';  
elm.style.top = '#px';


It does take me a while to grok/understand what you are suggesting, as in this case, and it may take a while for me to try it out. It may seem you are throwing your pearls to swine...not so. Oink Oink

Also, your nudge:
Quote
I still think that you should aim to do it without the meta refresh

Has me thinking that perhaps if I wrote the Css style as in line attributes rather than separate Css stylesheets, perhaps the meta refresh cheapshot/trick might be unnecessary. I'll have to check it out sometime.

So thanks!

Edited by joval 2019-11-10 3:10 PM
 Top of the page
C:Amie Page Icon Posted 2019-11-10 5:49 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
:/

#GenderReassigment

You can dynamically change CSS style and class assignment through DOM manipulation.
 Top of the page
joval Page Icon Posted 2019-11-12 1:46 AM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Ohhh! sorry about that C:Amie! was working with the Cmonex rom upgrade recently( I need the bootloader upgrade 4.05 to 4.1, can't find it)...no gender reassignment intended.Really!! Fortunately its reversible. (I hope it didn't hurt much). (Since you brought up the subject, I was recently watching youtube video Douglas Murray...brilliant fellow...courageous too...insightful IMO).

Makes me laugh a bit...I was wondering if you were being cryptic with that reply...I'm thinking what the heck does he mean by that...now it only took me a day or so to see my error...getElementByThe WrongID().

FYI, I noticed that the time interval of 1000 was too long and the clock dropped a second about every 10 seconds...I guess the processor delay is an issue...so I set it for something around 860 to reduce dropping seconds...works better.

Edited by joval 2019-11-12 1:57 AM
 Top of the page
CE Geek Page Icon Posted 2019-11-12 6:20 AM
#
Avatar image of CE Geek
Global Moderator
H/PC Oracle

Posts:
12,662
Location:
Southern California
Status:
Quote
C:Amie - 2019-11-10 9:49 AM

:/

#GenderReassigment


Dunno about that. A lot of folks here have mistaken you for female too, Ye Admin. Something in the username, maybe.
 Top of the page
C:Amie Page Icon Posted 2019-11-12 7:23 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
Yeah but at least none of them called me CmoneX, even if they are dreaming that I am... bunch of perv's
I'm sure CmoneX would have something to say about it too!

The bootloader upgrade is in H/PC:Update.

The clock skew isn't surprising. It's why ActiveSync has a time sync occur on connect. CE's power limits were always a problem and this caused RTC issues on pretty much all battery devices.
 Top of the page
1 2
Jump to forum:
Seconds to generate: 0.253 - Cached queries : 73 - Executed queries : 11