View Full Version : How Do You Make Multiple Image Map Areas Work As Form Submit Buttons?

11-19-2010, 06:53 PM
Thank you in advance for your help! I've been trying to do this for over 12 hours without much luck at all... :confused: Please help me figure this VERY SIMPLE little thing out, the current code is sooooooo close to working perfectly and I feel like such a fool, and really have to finish this today somehow! :eek:

I have a map of the world, with an image map of every single country, and all I want to happen is: IF a user clicks on a country (for example, "USA") THEN an email is sent to me which says "Country: USA" and the user is redirected to a page that says "Thank You"

My "Image Map Form" is working 100% perfectly, except that the email I receive has the subject line, but NO CONTENT! How can I make it send me the Country Name?

These codes ARE both working in the "area" attributes to successfully SUBMIT the form:



These codes AREN'T specifying the Country Name in the EMAIL the above codes send out:


id=Country name=Country value=CANADA

I think my mistake may be that I'm specifying the hidden input field incorrectly, but here's how it's specified in the form, right above the image map:

<input type="hidden" name="Country" id="Country" runat="server">


11-22-2010, 12:31 AM
ALAS! A user named "birdbrain" on WebmasterWorld.com delivered the FAST, SIMPLE & EASY solution to the original question:

you are submitting the form before you have set the input value. ;)
It should be...

onclick="document.forms['WorldMapForm'].Country.value= 'Canada';document.WorldMapForm.submit()"

Thank you to all who have helped find the answer to this question, that after a week of research, it seems dozens if not thousands of people are looking for.

11-22-2010, 12:38 AM
Hi there loveDesign,

ALAS! A user named "birdbrain" on WebmasterWorld.com
I know "birdbrain" intimately. He is my alter-ego. :D