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

  • SEARCH
  • Home
  • 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 3992348
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:45:15+00:00 2026-05-20T06:45:15+00:00

I’m building a form for a client and they’ve requested a map of the

  • 0

I’m building a form for a client and they’ve requested a map of the city to let visitors visually pick their location, and have that link to the City: Dropdown/Select area of the Form.

Here’s the clients old, archaic & disgusting website showcasing what they want done, seriously though, it’s terrible.
http://www3.telus.net/russellsrubbish/order_form.htm

I was looking at this Hidden Form Value Change and I’m unsure if this would be pushing in the right direction?

If I failed to explain myself properly I apologize, I’m pretty novice when it comes to jQuery.

  • 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-20T06:45:15+00:00Added an answer on May 20, 2026 at 6:45 am

    To make this work i would make a background sprite with a map and use image maps.
    Just use jquery to react on clicking one of the hotspots and change the selected index in your select box.

    —————————————- EDIT – Working example ——————————

    Heres a working example i made for you: Example
    You can click 2 regions in the netherlands on the map, “noord-brabant” and “gelderland”.

    HTML:

    <div class="mymap">
      <img alt="" src="map_overlay.png" usemap="#holland">
    </div>
    
    <map id="mymap" name="holland">
      <area shape="circle" coords="280,230,30" alt="gelderland" />
      <area shape="circle" coords="200,300,30" alt="brabant" />
    </map>
    
    <select class="mymapselect">
      <option value="none">Take a pick on the map</option>
      <option value="brabant">brabant</option>
      <option value="gelderland">gelderland</option>
    </select>
    

    Css:

      .mymap {
        background: url('map.png');
        width: 393px;
        height: 449px;
      }
    
      .mymap.brabant {
        background-position: -393px 0;
      }
    
      .mymap.gelderland {
        background-position: -786px 0;
      }
    

    JS:

    <script type="text/javascript">
        $('area', '#mymap').mouseover(function(){
          $('.mymap').attr('class', 'mymap ' + $(this).attr('alt'));
        });
        $('area', '#mymap').mouseout(function(){
          $('.mymap').attr('class', 'mymap');
        });
        $('area', '#mymap').click(function(){
          $(".mymapselect").val($(this).attr('alt'));
        });
    </script>
    

    So what i actually did is make a sprite with the background images for the map.
    Use a transparent img so we can add our image maps and make hovers on the area’s change a class based upon the alt attribute. You just need to add styling for all regions and make the sprite move.

    Hope this helps 🙂

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

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.