/    Sign up×
Community /Pin to ProfileBookmark

createTextRange, CaretPos ?

If some one is aware of what ‘createTextRange’ & ‘CaretPos’ are I’de be very happy if you could explain. I could not find them in any tutorial or reference on JS. I suspect on is a method. But what do they do? Do they work in both IE & NN?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@JonaMay 23.2003 — [b][font=arial][color=maroon]createTextRange() is DOM-specific, so it will work cross-browser in DOM Level I compliant browsers.



caretPos is IE-only, and gets the current position of the "blinking text bar" in a textarea[/color]
[/font][/b]
Copy linkTweet thisAlerts:
@JonaMay 23.2003 — [b][font=arial][color=maroon]Shoot me, Dave! :p I couldn't find caretPos at MSDN, but it sounded so much like it existed... I thought I had seen some type of caretPos() method somewhere, though... So you're right, it must've been a user-defined prototype. And... About the createTextRange() method.. I thought it was cross-browser... Again, I didn't know but it always worked for me but I use IE too much... Thanks for clearing that up, though.[/color][/font][/b]
×

Success!

Help @jsme spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...