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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:09:49+00:00 2026-06-12T11:09:49+00:00

I have one link which opens a div and it works fine, but I

  • 0

I have one link which opens a div and it works fine, but I cannot make it to move to location of mouse click. Code is as follows:

Link:

<a href="#" onclick="show_popup('my_popup')" id="napFilt">Filter</a>

Function:

 function show_popup(id) {               
     if (document.getElementById){ 
         obj = document.getElementById(id); 
         if (obj.style.display == "none") {
             obj.style.display = "";
         } 
     } 
 }

Using JS, how can I make the displayed div move to the position of the mouse click?

  • 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-12T11:09:51+00:00Added an answer on June 12, 2026 at 11:09 am

    Make sure the div you are “spawning” is in the body tag. It sould have “position: absolute;” as css property.
    Then you do this: http://jsfiddle.net/GSxNx/5/

    I leave this pretty uncommented here since i commented source code there. 😉
    Only one thing: This is NOT! crossbrowser tested. It works though pretty well in FF 16.0 😉

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

Sidebar

Related Questions

I have a table which needs to link one of three seperate tables, but
I have one link in a div id where i have to disable the
my issue lokks similar to this one: (link) but i have one-to-many association: <set
i am adding more than one link button during runtime but they all have
i have one domain link text i want to know that does google crawl
You must have noticed one link in yahoo.com, msn.com or other popular websites named
i have one image in my html and i have 5 different link, i
I have one function for one element: <a href=javascript:void(0); onclick=dothis()>Link</a> When this function is
am using the application in this link http://www.jeasyui.com/tutorial/app/crud2.php .I have added one more column
I have two tables that link together through an id one is submit_moderate and

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.