...

View Full Version : One click per day random image generator help?



wrumble
11-20-2012, 09:53 AM
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.

minder
11-20-2012, 10:25 AM
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.

wrumble
11-20-2012, 02:41 PM
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

minder
11-20-2012, 08:01 PM
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.

wrumble
11-20-2012, 08:50 PM
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
11-21-2012, 10:57 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum