开发者

Tickets places selection with JavaScript

开发者 https://www.devze.com 2023-03-07 00:26 出处:网络
I need to write an web page where users can select a free seats in a different halls for an events. I prefer not to use flash and make it using on开发者_C百科ly javascript. Is there any library or exa

I need to write an web page where users can select a free seats in a different halls for an events. I prefer not to use flash and make it using on开发者_C百科ly javascript. Is there any library or example that can help me do it?

Edit: I'm asking how to create a client-side UI


I don't know a library, but this actually might be a case of using image maps in a semantically-correct, compatible way. The <map> and area tags are valid even in HTML5, and provide you the convenience of the DOM.


I am actually after this too for interfacing to civiEvent, however, this seems to be nebulous 'roll your own' territory for some reason.

The following script + tutorial might give you some mileage:

http://dayg.wordpress.com/2008/04/17/php-101-a-simple-seat-reservation-system/

Please update this thread with whatever you find!


Tickets places selection with JavaScript

If you want to go fancier than an image map, you can create a table with one chair per each cell as the physical arrangement looks. You can change each chair's picture according to the state of the seat. You could get fancy and have the chairs image change to a highlighted color, say yellow, when they hover over it.

Image transitions are done very easily with JQuery, a Javscript library. Here's some resources for rollover images with JQuery : http://webdevel.blogspot.com/2008/04/rollover-images-with-jquery.html

The bad part about this is arranging the chairs, but JQuery is the easy part and it will make your page look fancier and more user friendly. Because with an image map, the actual image can't really change itself to show that seat 4321 has been taken (but you can certainly divulge this information via other means)

0

精彩评论

暂无评论...
验证码 换一张
取 消