Click here to Skip to main content
15,879,326 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How to access Internet explorer in ASP or in javascript Pin
Shog97-Mar-07 7:51
sitebuilderShog97-Mar-07 7:51 
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 
based on the selected text i get length of selected text.If i add this length of selected text to the starting index of selected text ,i will get end index of the selected text.

var element = document.getElementById('lblselectedtext').innerText;

//here entire text is stored in element variable.

var selectedText = document.selection.createRange().text;
var startingIndex = element.indexOf(selectedText);
var endIndex = startingIndex + selectedText.length;

here the problem is the first occurence of the selectedText's startingIndex is always taking into the account.

Eg.
"Practice more on javaScript.The more we practice the more we acquire."
is the sentence we have.

If i select the word "more" which occured at the second time in the above sentence and tried for its starting index it should give '32' as the starting index but i am getting the starting index of first occured "more" i.e '9' as the starting index.

Hope u understand the problem.







GeneralRe: Based on Javascript Pin
Shog912-Mar-07 4:57
sitebuilderShog912-Mar-07 4:57 
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 

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.