Countdown

Status
Not open for further replies.

WHWebSolutions

In Runtime
Messages
128
Hello I was wondering if someone could tell me the code or if they could direct me to a site or thread that would tell me this code. What I need is a code that would count down after someone clicks on a button. My client has coupons he wants to sell but he has only a certen amout. He wants it where when they click on the print button the amount of tickets would go down by one. Also could you tell me the code to atuomaticly go to the print screen?

Thanks,
William
 
Code:
<script>
<!--
function down() {
if (document.counter.box.value != 0) {
//alert(document.counter.box.value);
print();//print the screen
document.counter.box.value = --document.counter.box.value;//decrement counter
  }
}
-->
</script>
<form name=counter>
<input name=box type=text size=2 value=10>
<input type=button onclick=down(); value="minus one">
</form>

save attachment as html and open.
 

Attachments

  • new.html.txt
    371 bytes · Views: 31
Ok i see that it works but what about. if they go back to the website will it be back at the default number or will it stay at the last number? I downloaded the file and tested it and then reloaded it and it went back to the default number of 10. Please can you help me out with this now?
 
you'll need to move the variable to the server. you will need some type of server scripting & database support. ASP or PHP or CGI for scripting and a Mysql or SQL or access for a database.
 
is there a way that you could make me a database that could help me out with this? This would help me out alot as i do not know how to make a data base at all.

William
 
See I do not know any other code but HTML. If someone could make the code and files I need to get this code the way I need it then that would be very helpful.

Thanks
 
Why don't you learn how to do it yourself? Start learning. When you have questions or have developed some of your own code and need help, then post back here.

See I do not know any other code but HTML.
That's ok. Now you have proper motivation to learn something new.

Hello I was wondering if someone could tell me the code or if they could direct me to a site or thread that would tell me this code. What I need is a code that would count down after someone clicks on a button. My client has coupons he wants to sell but he has only a certen amout. He wants it where when they click on the print button the amount of tickets would go down by one. Also could you tell me the code to atuomaticly go to the print screen?
You offer "web solutions" professionally, and you don't know anything aside from HTML? I hope you don't tell that to your customers. Why do you shun PHP, ASP, and any type of technology that supports dynamic websites? (I got that info from your website). Why don't you just bite the bullet and learn those technologies, especially PHP? It's not really that difficult.

If you plan on experiencing any kind of success offering "web solutions", it should be your business to learn about all the current technologies and offer them to your clients. Creating purely static HTML websites is a thing of the past.
 
Status
Not open for further replies.
Back
Top Bottom