473,778 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Graphical selection

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

Jul 23 '05 #1
5 2866


Bob Bedford wrote:
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.


Drawing seats can be done by SVG which can be manipulated by JavaScript,
Adobe has a demo of that at
http://www.adobe.com/svg/demos/devtrack/theater.html

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #2

Bob Bedford wrote:
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 <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html

Jul 23 '05 #3
Thanks Martin,

I need something without installing any plugin !!!! but this can be done in
pure Javascript and also in server side script (PHP/ASP), without the need
for a plugin.

I am wrong saying this ??? OnMouseOver and OnMouseClick can be used to
switch the image type of a certain place ??? I've never worked with it, so I
don't know if it works.

Please tell me if it can be done with Javascript and PHP !

BoB

"Martin Honnen" <ma*******@yaho o.de> a écrit dans le message de
news:40******** @olaf.komtel.ne t...


Bob Bedford wrote:
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.


Drawing seats can be done by SVG which can be manipulated by JavaScript,
Adobe has a demo of that at
http://www.adobe.com/svg/demos/devtrack/theater.html

--

Martin Honnen
http://JavaScript.FAQTs.com/


Jul 23 '05 #4
Grant Wagner wrote:
Bob Bedford wrote:

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.


Each "seat image" would be a transparent gif that you could, onclick,
change its background color. Then, you only need one image. Perhaps 4
images if the stage is centered with chairs/seats on all 4 sides.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #5
On Wed, 30 Jun 2004 18:50:45 +0200, "Bob Bedford"
<be******@YouKn owWhatToDoHereh otmail.com> wrote:
I need something without installing any plugin !!!! but this can be done in
pure Javascript and also in server side script (PHP/ASP), without the need
for a plugin.
Since you're relying on javascript for the enhanced functionality, you
might aswell rely on a plugin too, and just leave the other folk with
the simple view (a static image and a form saying "which seats")
I am wrong saying this ??? OnMouseOver and OnMouseClick can be used to
switch the image type of a certain place ??? I've never worked with it, so I
don't know if it works.


Not in a remotely efficient way.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3330
by: brian.vincent | last post by:
I'm trying to use the ssh2 functions to run a graphical app. I have no problem opening ssh2_shell and running something like "/bin/ls /tmp". However when I try to do something like: fwrite($stdio,"/usr/X11R6/bin/xclock -display some-other-machine:0\n"); It doesn't work. I've tried wrapping the xclock command in a shell script and a C program and still no luck. In both instances I can ssh into the remote machine and run the commands...
0
1292
by: Jesper | last post by:
I know that user interface library questions come up on this list every now and then. I've lurked here for a while and also searched google for anything that would fit my needs but haven't found anything. What I would like is a python library that exposes a simple API for creating a mostly dialog-based user interface. This library should work both on text and graphical terminals and be portable. The closest matches that I've found are:...
0
1249
by: cm012b5105 | last post by:
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my boss's Dad the one they call in indian language DEEP THOUGHT LITTLE HORSE" if s=='carol': print "ahhh you are my boss's mom the one they call WREATH WOMAN" if s=='rebecca':
0
1850
by: Marc te Vruchte | last post by:
Over the past years i've been in contact with the same problem a number of times, creating a graphical user interface on complex XML documents. Personally these solutions have never been satisfactory to me as a developer. I am not sure if this is caused by the way i've approached the problem or that it is the maturity of current day XML technologies. Let's say we are developing Form interfaces on complex XML documents which have a...
10
2107
by: William Gill | last post by:
Being somewhat new to Python, and having a tendency to over complicate things in my class design, I was wondering if anyone can suggest a simple graphical or flowcharting tool that they use to organize their class and program design? Because of a 55 mph head-on accident a few years back, I have short term memory problems, so flipping back and forth between pages of code is next to impossible for me to keep straight. A simple graphical...
0
240
by: simsimlhr | last post by:
What i want to do is given below. I have put whole form in region class. Now i want to exclude some independent points from that region I will probably use region.Exclude(graphicalpath) ,will probably add independent point in graphicalpath class to be excluded from the region. I cannot make different graphical path objects and add a rectangle around one point to each graphical object for each point and exclude from the region.If we...
5
1540
by: John Smith | last post by:
Hello Coould please any one to help me to find good graphical controls to create GDI in ASP.NET. Some related websites also really appreciated Thanks in Advance John
1
1584
by: SatishPasala | last post by:
hi I have like three aspx pages. Each page has a few check boxes. So depending on the selection of the check boxes the meter which is a semi circle with a pointer .(I have to build the graphical component too) When a check box is selected the pointer on the meter moves to an angle to right.
5
12872
by: STeve | last post by:
Hey guys, I currently have a 100 page word document filled with various "articles". These articles are delimited by the Style of the text (IE. Heading 1 for the various titles) These articles will then be converted into HTML and saved. I want to write a parser through vb.net that uses the word object model and was wondering how this could be achieved? The problem i am running into is that i can not test whether the selected text is...
5
2022
by: Brian Blais | last post by:
Hello, I was wondering what the approximate minimum age to learn python is. Has anyone had experience teaching middle school students, or elementary school students Python? What brought this up for me is thinking about starting a Lego robots group in a local middle school. I only teach college, and have little experience with middle school students, so I find it hard to guess what they could actually do. I started programming when I...
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9465
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10068
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7474
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2863
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.