Hya!
The code underneath is giving me lots of problems but I can't figure out what might be wrong, as I am very new to JavaScript. I would be grateful if somebody could give me a hint on what I should do to fix it.
Let me explain what this code is supposed to do briefly. I have a music venue that has a maximum number of tickets set to 100. On my page I want to show the number of tickets available on a text box or any other way that would let this change dynamically. This number would change based on which option the user would select on the drop-down list but would start as 100.
I would like that the number of tickets available were then sent to my server together with the other information given in the form.
Up to now the number of tickets selected by the user is sent and also the name of the band but not the number of tickets available.
I would also like to block the okay button if there are no tickets available. That's why I've added an alert to the code but I don't think it's a good solution.
Alternatively the number of tickets available could be linked to a database, but I would say that's too advanced for me at the moment.
I am looking forward to hearing from you.
Yours,
Saulo
PS.: All my pages are in
JSP.