By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Small carparking script needs "FULL" alert, need advice please...

P: 1
Hi to all.

I am so new in this, I don't know how to finish my homework-question. I have to go to bed now ánd need to find an answer a.s.a.p. Who is willing to help this Dutch boy?

I have to count the number of cars in a carparking. So far so good. But:
If number of cars >100 there should popup an alert "GARAGE FULL"
If number of cars =0 there should popup an alert "GARAGE EMPTY"
This is how far I have come in 4 hours. ;-)


Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Carparking</title>
  4. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  5. <meta name="generator" content="HAPedit 3.1">
  6. </head>
  7. <body bgcolor="#ABCDDE">
  8. Carparking <br><br>
  9. <input type="submit" value="car driving in" onclick="document.getElementById('vak').value++; return false;" /> <br />
  10. <input type="submit" value="auto driving out" onclick="document.getElementById('vak').value--; return false;" /> <br />
  11. <input type="text" id="vak" value="0" /> the number of cars in the carparking
  12. <br /><br />
  13. </body>
  14. </html>


THANKS!!
Dec 11 '09 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
you need a mandatory check before the in/decrease, whether the target value is within the limits.
Dec 11 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.