Seats Calculator

A sample of seat calculation. In the Javascript you find a function called ‘ReserveSeats’ that does the calculation. It gets some variables from Lectora and based on those it calculates if the amount you want to reserve is available. If so, it colors some chairs red. If not a message is shown.
Some nice concepts of using Javascript in Lectora are used in this sample. So i use a class for all the seats ( seats and seats_o ) Both classes are read into Javascript at the begin, and so the script knows how to show seats. I am planning to improve on this setup. Have some plans for extra animation and more… but thats for a next version.

Preview image


Your email address will not be published. Required fields are marked *