Treat area as a link

windows

Guest
Hi<br />
I'm rather new to html and I would like to know if it's possible to treat an area from a map as a link.<br />
Here is what I've got so far:<br />
<br />
<area shape="rect" <br />
coords="0,0,55,35" <br />
alt="Area1"<br />
href=http://www.webdeveloper.com/forum/archive/index.php/"area1.htm"><br />
<br />
<br />
What I want is that when people click on the area, a number appears on the area saying how many people have clicked on that area.<br />
Anyway, I guessed I could do this with javascript and put a variable on the area and when someone clicks on it, I'll do var_number + 1 or whatever.<br />
<br />
Basically, is it possible to do something like this: <br />
onClick="var_number + 1" for an area.<br />
<br />
If not, how else could I do this?<!--content-->As far as I know, this can't be done in Javascript. The number displayed would be local to each user doing the clicking, and the counter would stop counting as soon as the page was unloaded, resetting itself when the page was loaded again.<br />
<br />
The best way to do this would be with a server-side language and a database, writing the number of clicks as a variable. Each time the page is loaded the script would read that variable and display it in the appropriate place, and each time the link was clicked the script would increment the variable and write it to the database.<br />
<br />
Hope this helps!<br />
<br />
-jinkas<!--content-->Thanks a lot for your answer.<br />
Could you possibly give me a bit of advice on how to do this with a server-side language?<!--content-->
 
Back
Top