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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:55:35+00:00 2026-06-01T00:55:35+00:00

<html> <script language=javascript> document.onmousemove=function(evt) { evt = (evt || event); document.getElementById(‘x’).value = evt.clientX; document.getElementById(‘y’).value

  • 0
<html>
<script language="javascript">
document.onmousemove=function(evt) {
    evt = (evt || event);
    document.getElementById('x').value = evt.clientX;
    document.getElementById('y').value = evt.clientY;
    document.getElementById('a').style.left = evt.clientX;
    document.getElementById('a').style.top = evt.clientY;
}
$('.test').disableSelection();?
</script>
<body style="cursor: none;">
<input type="text" id="x"></input><br>
<input type="text" id="y"></input>
<div id="a" style="height: 3px; width: 3px; background-color: green; border-radius: 3px; position: absolute;"></div>
<div id="b" class="test" style="position: absolute; top: 0px; left: 0px; height: 100%; width: 100%;"></div>
</body>
</html>

This is the code I’m using. Now, if you try to use this code in your browser (I use Google Chrome or Firefox), you will notice that the green dot isn’t following the cursor coordinates.

The dot will only follow the cursor if you remove all the other javascript code except for the ones you use to locate the cursor and to place the dot.

I have tried to locate the cursor with many other code and I also tried to use this code in combination with other javascript code but every time I tried, it doesn’t work with other Javascript code in the file.

Then I tried to seperate the Javascript code in to different files:

<script language="javascript" src="loccur.js"></script>
<script language="javascript" src="disabletext.js"></script>

and it gave the same result.

I hope someone can help me to use this cursor-location-code or a similar one in combination with other javascript code.

  • 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-01T00:55:36+00:00Added an answer on June 1, 2026 at 12:55 am

    Works fine for me in chrome if you remove the ‘?’ at the end of line 10

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

Sidebar

Related Questions

<html> <head> <script language = javascript> show = function() { document.getElementById(name).innerHTML = window.opener.game.pl.guild.n; var
I'm using the javascript: <SCRIPT LANGUAGE=JavaScript> function Check(chk) { if(document.myform.CheckAll.value==Check All){ for (i =
Sample code: <!DOCTYPE html> <html> <head> <title>test</title> <script language=javascript type=text/javascript> function init() { var
This is my script: HTML Code: <script> function pickIt(pId){ if(document.getElementById(pId).checked==true){ document.getElementById(pId).checked=false; }else{ document.getElementById(pId).checked =
See example: <!DOCTYPE html> <html> <head> <title>language</title> <script type=text/javascript src=http://www.google.com/jsapi> </script> </head> <body> <div
I have this script on my html page: <script language='javascript'>parent.resizeTo(550,510);</script> I'd like to add
I have the following code that works fine in IE: <HTML> <BODY> <script language=JavaScript>
<html> <head> <style type=text/css> #navigator a { display: none; } </style> <script type=text/javascript> function
When you execute following example using Firefox 3: <html> <head> <script language=javascript type=text/javascript> <!--
In the code HTML+Script below, an event handler is attached after page load using

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.