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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:42:18+00:00 2026-05-20T00:42:18+00:00

I am trying to find the current caret position (the blinking |) in x

  • 0

I am trying to find the current caret position (the blinking |) in x and y coordinates. Does anyone have a way of doing this? I really don’t know where to get started.

I know this is possible in javascript, as there is a glitchy jQuery plugin for it, but I want to do it without jQuery.

More specifically, I am interested in mimicking the way Google Instant displays the #1 selection as grey text. I plan on doing this for both textfields and textareas by retrieving the caret position (like I mentioned above), then placing the text using absolute positioning. If someone has a better way to do it, let me know.

Thanks!

  • 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-20T00:42:19+00:00Added an answer on May 20, 2026 at 12:42 am

    I would say that you’re better off putting the entire guessed string (including the text typed so far) as a background label div and make the input box transparent.

    Positioning the input box and the div ought to be trivial. That way, you can make the label gray and it’ll give the same effect.

    Would that work?

    EDIT: checked what google instant does. They have two input boxes positioned on top of each other and the guess is populated in the background input

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

Sidebar

Related Questions

I use jQuery. I'm trying to find a way to get the current width
I am trying to find the current position of an iPhone ImageView that is
I'm trying to find out current user name for my sharepoint application. There are
I am trying to find the virtual file that contains the current users id.
Trying to find the sqlserver adapter for rails on windows. I have tried getting
Trying to find the best way of create an overlap/overlay layer to fill the
Trying to find a way to send a POST HTTPS request from Python to
Trying to find examples of when decorators might be really beneficial, and when not
I'm trying to find the best way to calculate the box size needed for
Using VS2008sp1: trying to find a reliable way (or proper way) to update a

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.