October 3, 201510 yr 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 October 3, 201510 yr by Mikhail
October 4, 201510 yr Is this a FileMaker question? Don't think so. Edit: now I see . . . Edited October 4, 201510 yr by Rick Whitelaw
October 4, 201510 yr 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, 201510 yr by Lee Smith
October 5, 201510 yr 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.
October 5, 201510 yr 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...
October 8, 201510 yr Author Newbies Well, I took Josh Ormond's advice, and it worked perfectly! kinda wish it didn't leave a box on my page, ah well.
October 8, 201510 yr 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.
October 8, 201510 yr 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, 201510 yr by ggt667
Create an account or sign in to comment