Hi All, I am back again asking for help ....sorry. I know it is very small, but $5 for your help (PayPal only) Could someone please help me around with Cookie functions for this small game. Cookie can store the value of random number and number of guesses once the browser is re opened ? Any help would be great.... Many thanks
Tks Rukbat, I can get the cookie to store the value from the input field but can't seem to work out the number of guess left. Like if a person makes two guesses and closes the browser and then comes back, cookie should be able to read both the last value of random number and number of guesses. Sorry i am not the best with HTML & JS ...
That's not HTML or Javascript, that's program design. Write down exactly WHAT (not how) you want the program to do in English, not in a programming language. See if there's a cookie. If there is, get the values for ... Generate a random number. Accept a guess. Set a cookie with ... That's how programming is actually done. Then you write the code to do what you wrote down. Assume that you'll never know when the user leaves the site, so you have to set the cookie at any time something changed that you'll want to know the next time he comes back.
Rukbat, I think even a novice would figure out from the html CODE above as to what is happening. Basically this is a number guessing game between 1 & 100. User needs to guess with in 5 trials. I was looking for someone to supply me with the Cookie functions that i can use straight away. If you dnt want to help please dnt ruin the thread. I already mentioned i wasn't the best with HTML & JS. Anyways, Thanks for your suggestions