Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-20-2012, 09:53 AM   PM User | #1
wrumble
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
wrumble is an unknown quantity at this point
Post One click per day random image generator help?

Hi there, i am trying to create an app for my restaurant/bar using a free website service(not sure if im allowed to name it, will do if asked) and it has a html script page where i can enter and edit my own html. I want to use this to create a random image generator or there abouts so that people can push a button or spin a wheel once a day to see if they can win some drinks and food deals. Currently im thinking of just simply using a button that selects an image at random then displays it (saying the deal they might have won), i have found some code that can randomly choose the image but i cant find any code that will make it work only once in an evening between certain times from the push of a button. I am open to any suggestions or possible improvements that would make it more interactive. Thanks for your time in advance.
wrumble is offline   Reply With Quote
Old 11-20-2012, 10:25 AM   PM User | #2
minder
Banned

 
Join Date: Oct 2012
Posts: 81
Thanks: 0
Thanked 4 Times in 4 Posts
minder can only hope to improve
Since you want this to work between certain times, then this should really be done server side and not with javascript. If you use javascript you are first hoping that the user has javascript enabled in their browser, not all browsers do for whatever reason, and secondly you would be hoping the current time on the user's device is accurate.
minder is offline   Reply With Quote
Users who have thanked minder for this post:
wrumble (11-20-2012)
Old 11-20-2012, 02:41 PM   PM User | #3
wrumble
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
wrumble is an unknown quantity at this point
so could i just set a 24 hr down time on the button(like a timer) instead once it has been pushed? would that be a better option? im trying to make this as simple as possible. thanks
wrumble is offline   Reply With Quote
Old 11-20-2012, 08:01 PM   PM User | #4
minder
Banned

 
Join Date: Oct 2012
Posts: 81
Thanks: 0
Thanked 4 Times in 4 Posts
minder can only hope to improve
Quote:
Originally Posted by wrumble View Post
im trying to make this as simple as possible. thanks
I assume that's why you posted in the html/css forum. But what you want to do can't be done with just html and css. To do this properly so that it will work in all browsers you need a server side solution. If that is an option for you then perhaps repost in the php forum.

If you implement a javascript solution, it won't work in all browsers.
minder is offline   Reply With Quote
Old 11-20-2012, 08:50 PM   PM User | #5
wrumble
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
wrumble is an unknown quantity at this point
Is there any chance of something like this to be done in html as this is the only way i can do it on an app. any other suggestions welcome. thanks either way!
wrumble is offline   Reply With Quote
Old 11-21-2012, 10:57 AM   PM User | #6
wrumble
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
wrumble is an unknown quantity at this point
Quote:
Originally Posted by minder View Post
I assume that's why you posted in the html/css forum. But what you want to do can't be done with just html and css. To do this properly so that it will work in all browsers you need a server side solution. If that is an option for you then perhaps repost in the php forum.

If you implement a javascript solution, it won't work in all browsers.
By browsers do you mean phone types? sorry if im being a little slow, this is all very new to me.
wrumble is offline   Reply With Quote
Reply

Bookmarks

Tags
app, code, generator, html

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:04 AM.


Advertisement
Log in to turn off these ads.