Bob said:
I've to create a theater seat plan, where people may book online their
seats. It' there any way to "draw" seats with javascript (of different
colors, as closer your are to the scene, more you pay) and then select the
seats (so they change color when selected) and on the same page, change the
total price when changes are done ???? This should be on a FORM that I will
use to save the selected seats in a database.
Any idea ???? any close script I may use ????
Thanks for help
BoB
My first thought would be to produce two images with a floorplan of the
theatre, using different colors for selected and unselected, then chop it up
into thousands(?) of images, one for each seat. Use a table to reassemble the
image, then add Javascript to detect the clicks, swap images and keep track of
everything. Using an image map might seem like a viable solution, but support
for mouse events on image maps is worse then Javascript support in general, and
you'd have the problem of not being able to change the color of selected seats.
Using a thousand (?) image solution would result in a _huge_ amount of HTML
being delivered to the client's browser and would be dependant on the user
having Javascript enabled. So you'd be telling dialup users or those who have
choosen to disable Javascript that you aren't interested in their business.
Whatever solution you finally arrive at, I'd think you should consider people
with slower connections and those without Javascript available/enabled.
And no, it's highly unlikely there is any sort of pre-written script to do what
you want, although examples the individual bits you need to make it all work
(handling image swaps, managing form data, etc) are available (with various
levels of Javascript authoring competence) all over the Internet.
--
| Grant Wagner <
[email protected]>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-developer/upgrade_2.html