Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation How Do You Make Multiple Image Map Areas Work As Form Submit Buttons?

    Thank you in advance for your help! I've been trying to do this for over 12 hours without much luck at all... 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!

    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:

    Code:
    href="javascript:document.WorldMapForm.submit();"
    Code:
    onClick="WorldMapForm.submit();"

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

    Code:
    onMouseover="document.forms['WorldMapForm'].Country.value='CANADA';"
    Code:
    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:

    Code:
    <input type="hidden" name="Country" id="Country" runat="server">
    PLEAAAAAASE HELP IF YOU CAN

  • #2
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

    Code:
    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.

  • #3
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,742
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there loveDesign,
    ALAS! A user named "birdbrain" on WebmasterWorld.com
    I know "birdbrain" intimately. He is my alter-ego.

    coothead


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •