wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Calculating the number of tickets available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Calculating the number of tickets available" Watch "Calculating the number of tickets available" New topic
Author

Calculating the number of tickets available

Saulo Menezes
Greenhorn

Joined: Jan 15, 2003
Posts: 17
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.

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
did you get your answer at the CodingForums or should I try to answer it for you?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calculating the number of tickets available