Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2004, 02:18 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default is the text in text box selected?

hi all,
how shall I know if a text in text box is selected or not?


 
Old September 21st, 2004, 02:39 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

What do you mean by selected ?

Numan
--------------------------------------------------
Love is the most precious thing of this world. So find it and grab it!
 
Old September 21st, 2004, 03:15 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when you drag a mouse clicked over a text it's selected and that part of the text is highlighted!
Do you call it elseway?
 
Old September 21st, 2004, 08:58 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hello nerssi,

So, you mean you have an <input> element, that has text in it, and you want to know if there is any selected? Or do you have a <textarea>? Or is it just an area that has text? (like a <div> or a <span>)

-Snib <><
http://www.snibworks.com
There are only two stupid questions: the one you don't ask, and the one you ask more than once :-)
 
Old September 21st, 2004, 09:26 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My selecting problem is already solved via "document.selection.createRange().text"(which has nothing to do with what is selected and it works fine with everything )and I hate to waste time on what is already solved, so please help me with the new one(please)!
how shall I move the cursor in an input type="text"
I've already tried this one without any result:

xInputText.focus();
xInputText.createTextRange().move("character",-2);

it just does nothing!
what shall I do?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Box .text Property Displays conflicting Valus JPOhlman Visual Basic 2005 Basics 3 August 23rd, 2006 02:39 PM
Can't set text property of dynamic text box sreerajrs ASP.NET 1.0 and 1.1 Professional 1 May 31st, 2006 09:39 PM
insert text into a text box by selecting an link gavmc Other Programming Languages 0 February 15th, 2006 09:46 AM
How to retrieve last selected text line in text bo garetho General .NET 1 May 3rd, 2005 09:17 PM
Extract text from text file & put in dropdown box tsukey Beginning PHP 5 July 20th, 2004 09:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.