I need to show a clock (really simple one) to show the time of a booking.
So when it is submitted, it shows what is commonly seen as a clock (you seen them ticking on screen with second hand), but I don't want the second hand. I want it to just the hour and minute hand.
I could do it with a digital appearance using appropriate fonts, but be nice to do is a an analogue clock.
Is there a Javascript clock script, that can be altered to show the time based on a PHP variable?
Can Javascript generate a clock, from submit PHP submitted?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Can Javascript generate a clock, from submit PHP submitted?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Can Javascript generate a clock, from submit PHP submitt
Shouldn't be too difficult. What's the workflow here? User submits a booking, form posts, updates the DB, page is reloaded (or user redirected) and saved booking is shown with analogue clock to show the selected time? Either use time value straight from $_POST or send it to the new page if you're redirecting and pass that into whatever JS function sets the clock's time.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Can Javascript generate a clock, from submit PHP submitt
Oh yes I get all that - easy peasey, but I cannot find a JS function that can do it, and be set to use a variable instead, and no minute time.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: Can Javascript generate a clock, from submit PHP submitt
Is there a particular script you've looked at? Shouldn't be hard to tweak to your needs.
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: Can Javascript generate a clock, from submit PHP submitt
No - I came here because all those I found are JS and I'm not a JS expert at all. Couldn't see how I would be able to adjust.
It needs to be as simple a clock as possible tho.
It needs to be as simple a clock as possible tho.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.