473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Complex sticky rollovers on map.

Hi there.

Tricky one this. I am thinking of creating a map of our county
(Northamptonshire, UK) but I want users to be able to select 2 or more
areas by clicking on them once.

When they have picked say 3 areas, if they then click a next/submit
button the codes for the selected areas are passed to the next page.

I envision a different colour rollover and a third colour for the
selected state.

Would it then be possible to deselect an area by clicking it again????

This is bassically for a vacancies website.

Not sure how easy this would be, I am a designer rather than
programmer so you'll have to spell it out.

In fact thinking this through it might all be easier in Flash??? I
shall ponder on that.
TIA
Luke
Jul 23 '05 #1
2 1122
lh****@hotmail.com (Luke) wrote in message news:<e4**************************@posting.google. com>...
Hi there.

Tricky one this. I am thinking of creating a map of our county
(Northamptonshire, UK) but I want users to be able to select 2 or more
areas by clicking on them once.

When they have picked say 3 areas, if they then click a next/submit
button the codes for the selected areas are passed to the next page.

I envision a different colour rollover and a third colour for the
selected state.

Would it then be possible to deselect an area by clicking it again????


This is all possible. You'd have to keep the selected items in some
sort of array, then roll out the first selected as a new one comes in
(FIFO-first in, first out).
Jul 23 '05 #2
Larry Bud wrote:
lh****@hotmail.com (Luke) wrote in message news:<e4**************************@posting.google. com>...
Please do not write attribution novels.
[...] I am thinking of creating a map of our county
(Northamptonshire, UK) but I want users to be able
to select 2 or more areas by clicking on them once.

When they have picked say 3 areas, if they then click a next/submit
button the codes for the selected areas are passed to the next page.
[...]
Would it then be possible to deselect an area by clicking it again????


Your Question Mark key is borken. [psf 2.3]
This is all possible. You'd have to keep the selected items in some
sort of array, then roll out the first selected as a new one comes in
(FIFO-first in, first out).


It seems to me that you have misunderstood the request. A FIFO (queue)
would not be an appropriate data structure, AIUI he does not want the
area to be deselected automatically if a certain number has been
selected. An associative array would be. There is no such data
structure in ECMAScript and its implementations, but an object can
provide the functionality of it:

var areas = {
items: {},
toggle: function(a) {
if (typeof this.items[a] != "undefined")
{
delete this.items[a];
// deselect the area
}
else
{
this.items[a] = 1;
// (re-)select the area
}
}
};

<map ...>
<area ... onclick="areas.toggle('area51'); return false">
...
</map>
F'up2 comp.lang.javascript (please do not crosspost over hierarchies)

PointedEars
Jul 23 '05 #3

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

Similar topics

3
by: gallery | last post by:
I also cross-posted this in comp.infosystems.www.authoring.html. I think it's more appropriate here. I read somewhere that you can get Tim Murtaugh's Mo' Betta Rollovers to work in Firefox using...
10
by: idiotprogrammer | last post by:
Hi, there, I'm trying to do something, and part of the problem is that I don't know how to describe the effect. One block will have a list of links stacked over one another and separated by p...
2
by: Frances Del Rio | last post by:
Hi, I while back I was having a problem with rollovers, even though I do them in a very conventional way: function roll(i) { document.src = eval(i + "_roll.src") } // in which value passed...
3
by: Shahid Juma | last post by:
Hi, Is it possible to do roll overs over an area of an image. I know you can setup up a hotspot but can a roll over be done on that particular hotsop. Additionally, when the image changes on the...
2
by: Rothrock | last post by:
I trying to build a navigation bar for my company's website. We have different sections, Home, About, Product, etc. I have made the graphics and the basic JS for the Rollovers. To indicate...
3
by: Norman Swartz | last post by:
Rollovers on a web page I created were instantaneous on my computer when the page was loaded directly from my hard drive, but were painfully slow when loaded from the web. However, on another...
7
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why are my Rollovers so slow? ----------------------------------------------------------------------- Images...
9
by: student4lifer | last post by:
Hello, could someone show me how to make sticky form with dynamically generated form element? for example, if one likes to make the dynamically generated check box (and its name) 'sticky' that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.