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 6712117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:13:19+00:00 2026-05-26T08:13:19+00:00

I have an html page below with a section called #fullInfo. What i’m trying

  • 0

I have an html page below with a section called #fullInfo. What i’m trying to do is have it so that when a user clicks a area of an image map, it will pull in some data into the #fullInfo div.

I was trying to follow this tutorial http://net.tutsplus.com/tutorials/javascript-ajax/how-to-load-in-and-animate-content-with-jquery/.

The problem that i’m having though is that when you click an area of the image map, it just takes you directly to the url rather than loading it in the #fullInfo div.

Any ideas what i’m doing wrong?

Here’s my html page:

<!DOCTYPE HTML>

<html>

<head>
<style>

#content {
    width: 960px;
    margin: 0 auto;
    background: #c7c7c7;
    border: solid 1px #dcdcdc;
    overflow: hidden;
}
#main {
    width: 484px;
    float: left;
}
#sidebar {
    width: 400px;
    float: left;
    background: #e7e7e7;
    overflow: hidden;
}
#sidebar img {
    width: 200px;
    height: 200px;
}
#info {

}
#load {  
    display: none;  
    position: absolute;  
    rightright: 10px;  
    top: 10px;  
    background-color: red;  
    width: 43px;  
    height: 11px;  
    text-indent: -9999em;  
}  

</style>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js”></script>
<script type="text/javascript">
$(document).ready(function() {

    $('area').click(function() {

        var toLoad = $(this).attr('href');
        console.log('toLoad = '+toLoad);
        $('#fullInfo').hide('fast', loadContent);
        $('#load').remove();
        $('#main').append('<span id="load">Loading...</span>');
        $('#load').fadeIn('normal');

        function loadContent() {
            $('#fullInfo').load(toLoad, '', showNewContent());
        }
        function showNewContent() {
            $('#fullInfo').show('normal', hideLoader());
        }
        function hideLoader() {
            $('#load').fadeOut('normal');
        }

        return false;   // used so the link does take you to a new page
    });

});
</script>
</head>

<body>

    <div id="content">

        <div id="main">
            <!-- <img src=floorPlan.jpg /> -->
            <div style="text-align:center; width:484px; margin-left:auto; margin-right:auto;">
                <img id="Image-Maps_4201110211433362" src="http://www.image-maps.com/uploaded_files/4201110211433362_floorPlan.jpg" usemap="#Image-Maps_4201110211433362" border="0" width="484" height="480" alt="" />
                <map id="_Image-Maps_4201110211433362" name="Image-Maps_4201110211433362">
                    <area shape="rect" id="1" coords="68,35,139,85" href="http://www.google.com/logos/2011/mary_blair-2011-hp.jpg" alt="Meeting Room 200" title="Meeting Room 200" />

                </map>

                <!-- Image map text links - Start - If you do not wish to have text links under your image map, you can move or delete this DIV -->
                <div style="text-align:center; font-size:12px; font-family:verdana; margin-left:auto; margin-right:auto; width:484px;">
                    <a style="text-decoration:none; color:black; font-size:12px; font-family:verdana;" href="http://www.image-maps.com/" title="Meeting Room 200">Meeting Room 200</a>
                |   
                </div>
                <!-- Image map text links - End - -->

            </div>

        </div>

        <div id="sidebar">

            <div id="fullInfo">

                <img src="floorPlan.jpg" />

                <div id="info">
                    <h3>Some text here</h3>
                    <p>This is a paragraph about something or other here</p>

                    <p><a href="http://google.com title=Google">This here our link text</a></p>
                </div>

            </div>

        </div>

    </div>

</body>

</html>
  • 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-26T08:13:19+00:00Added an answer on May 26, 2026 at 8:13 am
    <script type="text/javascrtip">
    $('area').click(function() {
    

    change to

    <script type="text/javascript">
    $('area').click(function(e) {
        e.preventDefault();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple HTML page (ratings.html) that I'm trying to test using HtmlUnit.
I have the below code to parse an section of an html page. What
I have a HTML page that scrolls up and down (not a lot, but
I have an HTML page that uses AJAX to retrieve messages from a server.
I have a html page as below: <div id=test1> <table> <tr> <td><span id=234>ABKO</span></td> </tr>
I have a link that can not be identified in my html page shown
I just have an HTML page with an image & Content. <table> <tr> <td
I have this html page which globally exists of div , section , and
I have an html page that I am converting over to an asp .net
I have the following html that when a user selects leasehold additional form fields

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.