Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Banned
    Join Date
    Oct 2012
    Posts
    81
    Thanks
    0
    Thanked 4 Times in 4 Posts
    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.

  • Users who have thanked minder for this post:

    wrumble (11-20-2012)

  • #3
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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

  • #4
    Banned
    Join Date
    Oct 2012
    Posts
    81
    Thanks
    0
    Thanked 4 Times in 4 Posts
    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.

  • #5
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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!

  • #6
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •