Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted (edited)

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
Posted (edited)

Is this a FileMaker question? Don't think so. Edit: now I see . . .

Edited by Rick Whitelaw
Posted (edited)

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
Posted

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.

Posted

Also be aware: this was all the rage for a while when webviewers were first introduced.  And it caused a lot of performance issues.  So test very carefully...

  • Newbies
Posted

Well, I took Josh Ormond's advice, and it worked perfectly! kinda wish it didn't leave a box on my page, ah well.

Posted

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.

Posted (edited)

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

This topic is 3391 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.