Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4120102
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:10:39+00:00 2026-05-20T23:10:39+00:00

I have make a image map and have a form. In the form i

  • 0

I have make a image map and have a form. In the form i have three text fields. When i click on the image map. I click on the number 4. The number 4 must come in the text field “regio”.

A other example. When i click in the image map on the number 9. The number 9 must come in the textfield “regio”.

Here is my code: http://www.testdomeinnaam.nl/mike/

But how can i make this????
Thank you !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:10:39+00:00Added an answer on May 20, 2026 at 11:10 pm

    Three things:

    1 – for every area you need to attach a firing event.
    Way one:

    <area ... href="JavaScript: regionMap(6); void(0);" >
    

    Way two:

    <area ... onclick="regionMap(6); return false;">
    

    Way three:

    <script>
       jQuery("#imagemap area").click( function(){ 
            var s = jQuery(this).attr("alt");
            regionMap( s.substr(s.length - 2) );
       });
    </script>
    

    Note that this way takes the number of the region from the alt attribute – it’s not the best way.

    In the first two ways – you have to void(0) or return false to let the browser know you already handle the event yourself, and that you don’t expect it to send the page away because of the user click.

    2 – implement the regionMap methoid

    Way one – pure JS

       function regionMap(region) {
          document.getElementById("regio").value = region;
       }
    

    Way two – using jQuery

       function regionMap(region) {
          jQuery("#regio").val(region);
       }
    

    3 – add the implementation to your page

    Way one: embed in your html page code

    <script>
       function regionMap(region) {
          document.getElementById("regio").value = region;
       }
    </script>
    

    Way two – use JS resource.
    Create a file for example – regionsform.js, and in it :

       function regionMap(region) {
          document.getElementById("regio").value = region;
       }
    

    And embed in your HTML a reference to it.
    Assuming the HTML and the regions.js are in the same folder – it would look like

    <script src="regionsform.js"></script>
    

    Have fun & Good luck 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image a map, The image must be contained in a JFrame
I have an object of the type System.Drawing.Image and want to make every pixel
Is there anyway to make an image map W3C XHTML 1.0 Strict compliant? I'm
I have a virtual path (example: ~/Images/Banner.jpg) and I want to make that an
I have to make column charts in Excel using VBA only (no user input).
I have to make a schema for an XML format that's already being used.
I have a control which I have to make large modifications to. I'd like
For my university assignment I have to make a networkable version of pacman. I
In our application we sometimes have to make minor GUI modifications for different customers:
I'm working on an application where users have to make a call and type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.