Newbies Mikhail Posted October 3, 2015 Newbies Share Posted October 3, 2015 (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 October 3, 2015 by Mikhail Link to comment Share on other sites More sharing options...
Rick Whitelaw Posted October 4, 2015 Share Posted October 4, 2015 (edited) Is this a FileMaker question? Don't think so. Edit: now I see . . . Edited October 4, 2015 by Rick Whitelaw Link to comment Share on other sites More sharing options...
Lee Smith Posted October 4, 2015 Share Posted October 4, 2015 (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 October 4, 2015 by Lee Smith 1 Link to comment Share on other sites More sharing options...
Josh Ormond Posted October 5, 2015 Share Posted October 5, 2015 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 More sharing options...
Wim Decorte Posted October 5, 2015 Share Posted October 5, 2015 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... Link to comment Share on other sites More sharing options...
Newbies Mikhail Posted October 8, 2015 Author Newbies Share Posted October 8, 2015 Well, I took Josh Ormond's advice, and it worked perfectly! kinda wish it didn't leave a box on my page, ah well. Link to comment Share on other sites More sharing options...
Josh Ormond Posted October 8, 2015 Share Posted October 8, 2015 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 More sharing options...
ggt667 Posted October 8, 2015 Share Posted October 8, 2015 (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 October 8, 2015 by ggt667 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now