”@

Home 

javascript Programming Glossary: range

How to create a GUID / UUID in Javascript?

http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript

be at least 32 characters and should stay in the ASCII range to avoid trouble when passing them around. javascript guid..

Set cursor position on contentEditable <div>

http://stackoverflow.com/questions/1181700/set-cursor-position-on-contenteditable-div

var editable document.getElementById 'editable' selection range Populates selection and range variables var captureSelection.. 'editable' selection range Populates selection and range variables var captureSelection function e Don't capture selection.. isOrContainsFocus return selection window.getSelection Get range standards if selection.getRangeAt undefined range selection.getRangeAt..

jQuery Mobile: Markup Enhancement of dynamically added content

http://stackoverflow.com/questions/14550396/jquery-mobile-markup-enhancement-of-dynamically-added-content

9UQ9k Sliders Flip toggle switch Markup enhancement ' type range ' .slider Enhancement example http jsfiddle.net Gajotres caCsf.. button. Encapsulates the idiosyncracies of how jquery re arranges the DOM to display a button for either an a link or input type..

Generating random numbers in Javascript in a specific range?

http://stackoverflow.com/questions/1527803/generating-random-numbers-in-javascript-in-a-specific-range

random numbers in Javascript in a specific range How can I generate a random whole number between two specified..

JavaScript: client-side vs. server-side validation

http://stackoverflow.com/questions/162159/javascript-client-side-vs-server-side-validation

a max number of characters and that a number is with in a range. I guess the better question would be Are there any benefits..

jQuery Set Cursor Position in Text Area

http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area

pos pos else if this .get 0 .createTextRange var range this .get 0 .createTextRange range.collapse true range.moveEnd.. 0 .createTextRange var range this .get 0 .createTextRange range.collapse true range.moveEnd 'character' pos range.moveStart.. var range this .get 0 .createTextRange range.collapse true range.moveEnd 'character' pos range.moveStart 'character' pos range.select..

Can the jQuery UI Datepicker be made to disable Saturdays and Sundays (and holidays)?

http://stackoverflow.com/questions/501943/can-the-jquery-ui-datepicker-be-made-to-disable-saturdays-and-sundays-and-holid

for choosing an appointment day. I already set the date range to be only for the next month. That works fine. I want to exclude..

Set cursor position in html textbox

http://stackoverflow.com/questions/512528/set-cursor-position-in-html-textbox

elemId if elem null if elem.createTextRange var range elem.createTextRange range.move 'character' caretPos range.select.. if elem.createTextRange var range elem.createTextRange range.move 'character' caretPos range.select else if elem.selectionStart.. elem.createTextRange range.move 'character' caretPos range.select else if elem.selectionStart elem.focus elem.setSelectionRange..

Insert html at caret in a contenteditable div

http://stackoverflow.com/questions/6690752/insert-html-at-caret-in-a-contenteditable-div

to the question above actually works in IE as it uses the range.pasteHTML method but in other browsers the br tag would appear.. jwvha 1 Code function pasteHtmlAtCaret html var sel range if window.getSelection IE9 and non IE sel window.getSelection.. and non IE sel window.getSelection if sel.getRangeAt sel.rangeCount range sel.getRangeAt 0 range.deleteContents Range.createContextualFragment..

Set cursor position on contentEditable <div>

http://stackoverflow.com/questions/1181700/set-cursor-position-on-contenteditable-div

providing it as a starting point. IE doesn't support DOM Range. var editable document.getElementById 'editable' selection range.. window.getSelection Get range standards if selection.getRangeAt undefined range selection.getRangeAt 0 Get range Safari 2.. if selection.getRangeAt undefined range selection.getRangeAt 0 Get range Safari 2 else if document.createRange selection.anchorNode..

Javascript Highlight Selected Range Button

http://stackoverflow.com/questions/1622629/javascript-highlight-selected-range-button

Highlight Selected Range Button I'm attempting to create a study tool for a page that.. colour sel window.getSelection if sel.rangeCount sel.getRangeAt range sel.getRangeAt 0 document.designMode on if range sel.removeAllRanges.. if sel.rangeCount sel.getRangeAt range sel.getRangeAt 0 document.designMode on if range sel.removeAllRanges sel.addRange..

How to find cursor position in a contenteditable DIV?

http://stackoverflow.com/questions/2213376/how-to-find-cursor-position-in-a-contenteditable-div

range html if window.getSelection window.getSelection .getRangeAt range window.getSelection .getRangeAt 0 range.insertNode node.. .getRangeAt range window.getSelection .getRangeAt 0 range.insertNode node else if document.selection document.selection.createRange.. node else if document.selection document.selection.createRange range document.selection.createRange html node.nodeType 3 node.data..

How can I highlight the text of the DOM Range object?

http://stackoverflow.com/questions/2582831/how-can-i-highlight-the-text-of-the-dom-range-object

can I highlight the text of the DOM Range object I select some text on the html page opened in firefox.. text. userSelection window.getSelection var rangeObject getRangeObject userSelection Now i want to highlight all the text which.. question I would suggest using document 's or the TextRange 's execCommand method which is built for just such a purpose..

Javascript + Unicode

http://stackoverflow.com/questions/280712/javascript-unicode

. Check out the Regular Expression Match Unicode Block Range builder which lets you build a JavaScript regular expression..

apply style to range of text with javascript in uiwebview

http://stackoverflow.com/questions/2887101/apply-style-to-range-of-text-with-javascript-in-uiwebview

the non standard but convenient intersectsNode method of Range which exists in WebKit but was removed from Firefox in 3.0 so.. var nextId 0 var rangeIntersectsNode typeof window.Range undefined Range.prototype.intersectsNode function range node.. 0 var rangeIntersectsNode typeof window.Range undefined Range.prototype.intersectsNode function range node return range.intersectsNode..

How do I wrap a text selection from window.getSelection().getRangeAt(0) with an html tag?

http://stackoverflow.com/questions/5765381/how-do-i-wrap-a-text-selection-from-window-getselection-getrangeat0-with-an

do I wrap a text selection from window.getSelection .getRangeAt 0 with an html tag How do I take a selection from window.getSelection.. How do I take a selection from window.getSelection .getRangeAt 0 and surround it with an HTML tag such as 'span' or 'mark'.. text node you can use the surroundContents method of the Range. However that doesn't work in the general case. The thing to..

How to set caret(cursor) position in contenteditable element (div)?

http://stackoverflow.com/questions/6249095/how-to-set-caretcursor-position-in-contenteditable-element-div

but it doesn't work FF Chrome var range document.createRange var myDiv document.getElementById editable range.setStart myDiv.. improve this question In most browsers you need the Range and Selection objects. You specify each of the selection boundaries.. document.getElementById editable var range document.createRange var sel window.getSelection range.setStart el.childNodes 2 5..

wrapping a selected text node with span

http://stackoverflow.com/questions/6328718/wrapping-a-selected-text-node-with-span

case you need a more complicated approach. Also DOM Range and window.getSelection are not supported in IE 9. You'll need.. window.getSelection if sel.rangeCount var range sel.getRangeAt 0 .cloneRange range.surroundContents element sel.removeAllRanges.. if sel.rangeCount var range sel.getRangeAt 0 .cloneRange range.surroundContents element sel.removeAllRanges sel.addRange..

Insert html at caret in a contenteditable div

http://stackoverflow.com/questions/6690752/insert-html-at-caret-in-a-contenteditable-div

In most browsers you can use the insertNode method of the Range you obtain from the selection. In IE 9 you can use pasteHTML.. IE9 and non IE sel window.getSelection if sel.getRangeAt sel.rangeCount range sel.getRangeAt 0 range.deleteContents.. if sel.getRangeAt sel.rangeCount range sel.getRangeAt 0 range.deleteContents Range.createContextualFragment would..

Javascript Text Selection Page Coordinates

http://stackoverflow.com/questions/6846230/javascript-text-selection-page-coordinates

11 maybe earlier you can use the getClientRects method of Range . In IE you can use the boundingLeft and boundingTop properties.. use the boundingLeft and boundingTop properties of the TextRange that can be extracted from the selection. Here's a function.. var x 0 y 0 if sel if sel.type Control range sel.createRange range.collapse true x range.boundingLeft y range.boundingTop..

How can I use JavaScript within an Excel macro?

http://stackoverflow.com/questions/848246/how-can-i-use-javascript-within-an-excel-macro

going on here. Public Sub DiffAndFormat ByRef OriginalRange As Range ByRef NewRange As Range ByRef DeltaRange As Range Dim.. on here. Public Sub DiffAndFormat ByRef OriginalRange As Range ByRef NewRange As Range ByRef DeltaRange As Range Dim idiff.. Sub DiffAndFormat ByRef OriginalRange As Range ByRef NewRange As Range ByRef DeltaRange As Range Dim idiff As Long Dim thisDiff..