Click here to Skip to main content
15,882,055 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHow to compile Little Movie processing source format(.LS) file in windows Pin
malayappa6-Mar-07 21:54
malayappa6-Mar-07 21:54 
AnswerRe: How to compile Little Movie processing source format(.LS) file in windows Pin
Bradml6-Mar-07 22:17
Bradml6-Mar-07 22:17 
QuestionAdding smilies to a radiobuttonlist in a datagrid Pin
nclauder6-Mar-07 21:01
nclauder6-Mar-07 21:01 
QuestionBased on Javascript Pin
sudidelaravindra6-Mar-07 2:13
sudidelaravindra6-Mar-07 2:13 
AnswerRe: Based on Javascript Pin
Vasudevan Deepak Kumar6-Mar-07 10:12
Vasudevan Deepak Kumar6-Mar-07 10:12 
AnswerRe: Based on Javascript Pin
Shog97-Mar-07 8:39
sitebuilderShog97-Mar-07 8:39 
GeneralRe: Based on Javascript Pin
sudidelaravindra11-Mar-07 21:05
sudidelaravindra11-Mar-07 21:05 
GeneralRe: Based on Javascript Pin
Shog912-Mar-07 4:57
sitebuilderShog912-Mar-07 4:57 
I see. Sadly, indexOf() isn't terribly useful for this sort of thing, for just the reason you've found. Try something like this:
var selRange = document.selection.createRange();
var compRange = document.body.createTextRange();
compRange.moveToElementText(element);

// count distance from start
var startDist = 0;
while (selRange.compareEndPoints("StartToStart", compRange) > 0)
{
   ++startDist;
   selRange.moveStart("character", -1);
}
(full example: here[^])



----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN

AnswerRe: Based on Javascript Pin
Dmitry Khudorozhkov7-Mar-07 9:05
Dmitry Khudorozhkov7-Mar-07 9:05 
QuestionOpen a file from server Pin
hiral_shah6-Mar-07 0:44
hiral_shah6-Mar-07 0:44 
AnswerRe: Open a file from server Pin
Bradml6-Mar-07 1:28
Bradml6-Mar-07 1:28 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 1:36
hiral_shah6-Mar-07 1:36 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 1:49
Bradml6-Mar-07 1:49 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 1:56
hiral_shah6-Mar-07 1:56 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 13:29
Bradml6-Mar-07 13:29 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 17:47
hiral_shah6-Mar-07 17:47 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 17:59
Bradml6-Mar-07 17:59 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:09
hiral_shah6-Mar-07 18:09 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 18:13
Bradml6-Mar-07 18:13 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:18
hiral_shah6-Mar-07 18:18 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:31
hiral_shah6-Mar-07 18:31 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 18:34
Bradml6-Mar-07 18:34 
GeneralRe: Open a file from server Pin
hiral_shah6-Mar-07 18:42
hiral_shah6-Mar-07 18:42 
GeneralRe: Open a file from server Pin
Bradml6-Mar-07 19:00
Bradml6-Mar-07 19:00 
GeneralRe: Open a file from server [modified] Pin
hiral_shah6-Mar-07 19:23
hiral_shah6-Mar-07 19:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.