Image map to submit form

Live forum: http://forum.freeipodguide.com/viewtopic.php?t=75483

JennyWren

03-05-2008 18:30:48

HALP.

Does anyone know how to use multiple hotspots on an image map to act as multiple (different) submit buttons in a form? I can get a hotspot to work as a submit button, but I need the form to know which hotspot was clicked when it is submitted.

Suggestions?

JennyWren

03-05-2008 18:46:42

Forgot to mention that the form has other elements as well....so I can't just use an image map with the href set to the values.

dmorris68

03-05-2008 19:42:54

Offhand I would think you would supply an OnClick handler to each area element, which calls a JS function to submit the form. The JS could also populate any hidden field(s) based on the hotspot clicked, which would be submitted with the form.

There may be a better way, but I've not used an imagemap like that so that's the first thing that comes to mind.

JennyWren

03-05-2008 21:57:55

Success, thanks dmorris. Knew I'd have to start learning Javascript sometime....

It's just a prototype for now http//www.puzzology.com/planet_weights.php

Hmmm ... posting the code is doing weird things, oh well.

dmorris68

04-05-2008 09:05:40

Cool!

I think I'll be moving to Mars, btw. Pluto would be nice, but it's just too far...

TravMan162

04-05-2008 11:06:58

where's planet X at?

I thought they gave Pluto the boot as a planet and added X?

I heard some crazy shit about that planet.................. how it could revolutionize what we know, (or thought we knew) about gravitational pull and orbiting the sun and everything like that.

gnznroses

11-05-2008 16:47:26

Nope, they didn't add another when they demoted Pluto. They made a new category, dwarf planet, and added two to it. I think one of those was called Xena, but they're renaming it (if they haven't already)

TravMan162

11-05-2008 16:50:17

[quote08d8ad0d1e="gnznroses"]Nope, they didn't add another when they demoted Pluto. They made a new category, dwarf planet, and added two to it. I think one of those was called Xena, but they're renaming it (if they haven't already)[/quote08d8ad0d1e]

Xena was the name of the giant "tenth" planet i was talking about. Apparently, they called it "planet X" not only because it was going to be the tenth planet (at that point) but also because, "X" is short for "Xena," as you said. They called it Xena because they are a bunch of Sci-fi nerds. And yes. One of its orbiting moons was called Gabrielle.

What a bunch of dorks D

ilanbg

11-05-2008 16:57:54

I agree with dmorris's suggestions, btw.