Click here to Skip to main content
15,922,584 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Radio button value Pin
Bradml20-Dec-06 23:11
Bradml20-Dec-06 23:11 
QuestionI Need a Password Section for My site. How? Pin
Haun the 2nd20-Dec-06 3:20
Haun the 2nd20-Dec-06 3:20 
AnswerRe: I Need a Password Section for My site. How? Pin
Bradml20-Dec-06 3:27
Bradml20-Dec-06 3:27 
GeneralMessage Closed Pin
20-Dec-06 3:31
Haun the 2nd20-Dec-06 3:31 
GeneralRe: I Need a Password Section for My site. How? [modified] Pin
Bradml20-Dec-06 11:18
Bradml20-Dec-06 11:18 
GeneralRe: I Need a Password Section for My site. How? Pin
Haun the 2nd23-Dec-06 15:03
Haun the 2nd23-Dec-06 15:03 
GeneralCode Project toolbar for Firefox 2.0 Pin
Kevin McFarlane20-Dec-06 0:37
Kevin McFarlane20-Dec-06 0:37 
QuestionProblem with javascript Pin
sudidelaravindra19-Dec-06 18:12
sudidelaravindra19-Dec-06 18:12 
I have a text document bound to asp:label control.I want to get the starting index and ending index of selected text in the document.

Here is my javascript:
function CallForAnnotation()
{
var text = document.getElementById('lbltext').innerText;//Entire text
var selectedText = document.selection.createRange().text;//selected text
if(selectedText == "")
{
alert("Please select text");
return;
}
document.getElementById('hdnselectedtext').value = selectedText;//for server side purpose
var selectedWordStartingIndex = text.indexOf(selectedText);//starting index
document.getElementById('hdnStartindex').value = selectedWordStartingIndex;
var selectedTextLength = selectedText.length;//length of selected text
var selectedWordEndingIndex = selectedWordStartingIndex + selectedTextLength;//ending index
document.getElementById('hdnEndindex').value = selectedWordEndingIndex;
}

The above script works fine.
But if i select a word that occured several times in the document,only the first occurence of that word is reflected all the time and thus starting and ending indexes of selected text that we are getting is wrong.
AnswerRe: Problem with javascript Pin
Guffa19-Dec-06 19:21
Guffa19-Dec-06 19:21 
GeneralRe: Problem with javascript Pin
sudidelaravindra19-Dec-06 19:42
sudidelaravindra19-Dec-06 19:42 
AnswerRe: Problem with javascript Pin
Guffa19-Dec-06 21:13
Guffa19-Dec-06 21:13 
QuestionGrafics for a browser based game Pin
dylf19-Dec-06 9:47
dylf19-Dec-06 9:47 
AnswerRe: Grafics for a browser based game Pin
Bradml19-Dec-06 19:20
Bradml19-Dec-06 19:20 
QuestionRe: Grafics for a browser based game Pin
dylf20-Dec-06 7:36
dylf20-Dec-06 7:36 
AnswerRe: Grafics for a browser based game Pin
Bradml20-Dec-06 11:22
Bradml20-Dec-06 11:22 
AnswerRe: Grafics for a browser based game Pin
theJazzyBrain20-Dec-06 22:00
theJazzyBrain20-Dec-06 22:00 
QuestionIs it possible to add virtual controls to the DOM tree? Pin
howardjr19-Dec-06 6:02
howardjr19-Dec-06 6:02 
GeneralRe: Is it possible to add virtual controls to the DOM tree? Pin
George L. Jackson19-Dec-06 9:03
George L. Jackson19-Dec-06 9:03 
GeneralRe: Is it possible to add virtual controls to the DOM tree? Pin
howardjr19-Dec-06 11:53
howardjr19-Dec-06 11:53 
GeneralRe: Is it possible to add virtual controls to the DOM tree? Pin
George L. Jackson19-Dec-06 13:39
George L. Jackson19-Dec-06 13:39 
GeneralRe: Is it possible to add virtual controls to the DOM tree? Pin
howardjr19-Dec-06 15:53
howardjr19-Dec-06 15:53 
Questionwebsite development in different language.... Pin
Nagraj Naik19-Dec-06 1:05
Nagraj Naik19-Dec-06 1:05 
AnswerRe: website development in different language.... Pin
Bradml19-Dec-06 1:17
Bradml19-Dec-06 1:17 
QuestionCrystal Reports XI Pin
jagmit2019-Dec-06 0:50
jagmit2019-Dec-06 0:50 
QuestionComboBox custom web/server-side control - where's the data? Pin
howardjr18-Dec-06 18:29
howardjr18-Dec-06 18:29 

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.