Jump to content

Dynamic Clock possible?


This topic is 3116 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello, 

I would like to know how to place the current time on a section of my web page, display it a hh:mm am/pm, and for it to change every second without refreshing the browser manually. I would also like to do the same for the date.

Thanks in advanced! 

Edited by Mikhail
Link to comment
Share on other sites

Hi Mikhail, and welcome to the FM Forums 

Hello, 

I would like to know how to place the current time on a section of my web page,

 

This Custom Function seems to do this https://www.briandunning.com/cf/1079

To do this natively, as mention, you will see a jump in the screen when it refreshes the screen.

Edited by Lee Smith
  • Like 1
Link to comment
Share on other sites

The best way to do it is with either a JavaScript or PHP clock in a webviewer, or possibly embedded on the layout.

My question, would be why? Most devices have the time/date available to see at all times.

Link to comment
Share on other sites

As Wim said, watch it carefully. It can and will cause performance issues. And you most definitely want anything messing with the timing of actions when you are trying to give the user a good UX, and safe data.

Link to comment
Share on other sites

There is an example here: http://javascriptkit.com/script/cut2.shtml Now that was an ugly piece of code and a complete torturial,

I reindented the thing to make it halflegible: http://pastie.org/pastes/10467229/text?key=vvrpotfwm5y2axxufc5g

I would have done this way myself: http://pastie.org/pastes/10467239/text?key=bipgboktbu4qbmhihew

Edited by ggt667
Link to comment
Share on other sites

This topic is 3116 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.