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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:56:26+00:00 2026-06-10T04:56:26+00:00

I have been stumbled on this for a while and after a few weeks

  • 0

I have been stumbled on this for a while and after a few weeks of research I feel it safe to ask for help here.

What I am trying to do is this: User clicks an image> Light box displays larger image > Larger image has a hotspot with a link to another page.

Is this possible? It seems simple enough but I can’t seem to get it working. Here is the code for reference.

<a href="images/createaccount_img.jpg" rel="lightbox" usemap="#Map" map name="Map" id="Map"><area shape="rect" coords="323,205,567,361" href="URL LINK 1" target="_blank" /><area shape="rect" coords="995,613,1191,668" href="URL LINK 2" target="_blank" > <img src="images/panel_login_11.jpg" width="152" height="27" alt="" />

SOLUTION: the best option was to use http://fancybox.net/ which allows you to add many extra elements inside the box including: Divs, iframes, html and more! Thanks again everyone.

  • 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-06-10T04:56:28+00:00Added an answer on June 10, 2026 at 4:56 am

    First of all: map is a separate tag. So your code would never have worked.
    This is how you normally use a map:

    <a href="images/createaccount_img.jpg" rel="lightbox">
      <img src="images/panel_login_11.jpg" width="152" height="27" alt="" usemap="#map" />
    </a>
    
    <map name="map" id="map">
        <area shape="rect" coords="323,205,567,361" href="URL LINK 1" target="_blank" />
        <area shape="rect" coords="995,613,1191,668" href="URL LINK 2" target="_blank" > 
    </map>
    

    That being said, I then figured to place a attribute data-usemap on the link that contains the url to the full-size image. Like this:

    <a href="http://lokeshdhakar.com/projects/lightbox2/images/examples/image-1.jpg" rel="lightbox" data-usemap="#map"><img src="http://lokeshdhakar.com/projects/lightbox2/images/examples/thumb-1.jpg" alt=""></a>
    

    Then I modified lightbox.js to read this attribute usemap: $link.attr('data-usemap') and set that attribute $image.attr('usemap', _this.album[imageNumber].usemap);

    Now the full-size image has the correct usemap set.
    But it still does not work!! I think this is because of div’s that overlay on this image.
    Here is the fiddle I’ve worked on. Search for //xxx added to find the 2 lines I added. Maybe someone else could work on it some more.

    In other words, I don’t think it will be easy to create a mod over an unmodified lightbox.js.

    A also want to note that a lot of scripts like lightbox also resize the full-size image to fit the screen (lightbox does not do this as far as I could see): THEN you would also need javascript to re-calculate the coordinates in the map(s) I guess.

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

Sidebar

Related Questions

I have been hitting a dead end with this program. I am trying to
I have been reading the developer blog on Facebook this morning and stumbled across
I have been curious about dynamically create class at runtime in C# and stumbled
I have been playing about with canvas, but have stumbled across a problem. When
I've been practicing for an upcoming programming competition and I have stumbled across a
Have been trying to encrypt an xml file to a string so that I
Have been working on this question for a couple hours and have come close
Have have been trying to make a validator for my xml files. I have
I ve been looking at this for a while now It seems that binary
I have been working for a while on a project with the following components:

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.