|
 |
asp_web_howto thread: Re: Help! With a seat booking system!
Message #1 by "Marcel Hug" <mhug@h...> on Sun, 5 Jan 2003 15:14:00
|
|
> Hi,
>
> For my A-Level ICT project I am making a online booking system for my
school's Theatre. To allow people to choose the seats they want I have an
HTML page with a seat map of the theatre and a form check box in
each 'seat'. It's a total of 306 checkboxes, each is named as the seat it
represents, i.e a1,a2,... c4,c5 etc.
>
> What ideally I need an ASP page to do is get which seats have
been 'checked' by the user, and put the name of the seat into an array.
The users can book, hence check, any number of check-boxes, even the whole
theatre in one go if they wanted.
>
> If anyone has a simple way of doing this, or can think of a better way,
please let me know!!
>
> My second problem is that when the page is loaded, I need to make it so
that it can change the state of a seat by changing it's colour. There are
at the moment 3 states for the table cells which represent seats to be in:
>
> 1: Unbooked, so needs to have checkbox in it with a clear background.
> 2: Booked, needs to have no checkbox and be displayed in red.
> 3: Unavailabe, needs no checkbox and diplayed in grey.
>
> To decide what state a seat was in the ASP would need to look in the
database. A seat which is unbooked will NOT be in the seats table with
the relevant showID. A booked seat WILL appear with the relevant showID,
and a seat which is unavailable will appear in the table as booked by
user 'houseseat'.
>
> If anyone has any ideas on how to do this, it would be greatly
apprieciated.
>
> Finally if anyone reading this has had experience with making a booking
system for a theatre, cinema etc. and would be willing to give me some
help and advice, then please e-mail me.
>
> Thanks,
> Seb
Dear Seb,
I have seen your posting about your seat booking request. Well, we are
about to program a complete
booking system for various objects, and want to enhance this with just the
features you have
described in your post. What is your status about that? Do you have
further requirements?
You might want to have a look about our system at www.huginfo.ch ->
Reservation 2.0 English.
At the bottom of the page you find examples and demo versions.
Greetings - Marcel
Message #2 by "Drew, Ron" <RDrew@B...> on Mon, 6 Jan 2003 12:14:24 -0500
|
|
You can give the checkboxes the same name (lets use seats) for all 306
then when the user does the submit...
strseats =3D Request.Form("seats")
If strneeds <> "" Then
strneeds=3DReplace(strneeds, ", ", "-")
response.write "You selected seats: " strneeds
seatarray=3Dsplit(strseats, "- ")
End If
..now you have an array of the seats selected to update a DB...
..when you enter the form..do a onload and execute a script that test
for the checkmark...like so
<SCRIPT LANGUAGE=3D"JavaScript">
function inspectbox(){
for (var i =3D 0; i < 306; i++){
if (document.form1.seats[i].checked){
document.all.rij[i].bgColor =3D "E9C2A6"
}
else
{
document.all.rij[i].bgColor =3D "FFFFFF"
}
}
}
</SCRIPT>
...Of course you need to read the DB first and setup the var i above
-----Original Message-----
From: Marcel Hug [mailto:mhug@h...]
Sent: Sunday, January 05, 2003 10:14 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: Help! With a seat booking system!
> Hi,
>
> For my A-Level ICT project I am making a online booking system for my
school's Theatre. To allow people to choose the seats they want I have
an
HTML page with a seat map of the theatre and a form check box in
each 'seat'. It's a total of 306 checkboxes, each is named as the seat
it
represents, i.e a1,a2,... c4,c5 etc.
>
> What ideally I need an ASP page to do is get which seats have
been 'checked' by the user, and put the name of the seat into an array.
The users can book, hence check, any number of check-boxes, even the
whole
theatre in one go if they wanted.
>
> If anyone has a simple way of doing this, or can think of a better
> way,
please let me know!!
>
> My second problem is that when the page is loaded, I need to make it
> so
that it can change the state of a seat by changing it's colour. There
are
at the moment 3 states for the table cells which represent seats to be
in:
>
> 1: Unbooked, so needs to have checkbox in it with a clear background.
> 2: Booked, needs to have no checkbox and be displayed in red.
> 3: Unavailabe, needs no checkbox and diplayed in grey.
>
> To decide what state a seat was in the ASP would need to look in the
database. A seat which is unbooked will NOT be in the seats table with
the relevant showID. A booked seat WILL appear with the relevant
showID,
and a seat which is unavailable will appear in the table as booked by
user 'houseseat'.
>
> If anyone has any ideas on how to do this, it would be greatly
apprieciated.
>
> Finally if anyone reading this has had experience with making a
> booking
system for a theatre, cinema etc. and would be willing to give me some
help and advice, then please e-mail me.
>
> Thanks,
> Seb
Dear Seb,
I have seen your posting about your seat booking request. Well, we are
about to program a complete
booking system for various objects, and want to enhance this with just
the
features you have
described in your post. What is your status about that? Do you have
further requirements?
You might want to have a look about our system at www.huginfo.ch ->
Reservation 2.0 English.
At the bottom of the page you find examples and demo versions.
Greetings - Marcel
|
|
 |