Createrange Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business document.selection.createrange not working in ie11 Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Unable To Get Property 'createrange' Of Undefined Or Null Reference Ie11
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like document.selection.createrange().duplicate() ie11 you, helping each other. Join them; it only takes a minute: Sign up Unable to get property 'createRange' of undefined or null reference up vote 8 down vote favorite 3 The following code, which worked well right
Unable To Get Property 'createrange' Of Undefined Or Null Reference Combobox
up until I upgraded to windows 8.1 / Internet Explorer 11, is now throwing an error: "Unable to get property 'createRange' of undefined or null reference" var SelectedData = window.external.menuArguments.document.selection.createRange().text; Is there a fix / work around for this? * Question updated below with newer code that is still not working ....
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About
Document Createrange Example
Us Learn more about Stack Overflow the company Business Learn more about hiring
Getselection Createrange
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the javascript createrange w3schools Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Issue with createRange() method in javascript http://stackoverflow.com/questions/19748500/unable-to-get-property-createrange-of-undefined-or-null-reference in IE11 up vote 2 down vote favorite In IE11,createRange() method throws following error: "Unable to get property 'createRange' of undefined or null reference". I called createRange() method as follows: this._document.selection.createRange(); I tried with window.getSelection() but this is also not working for me. Reference: http://msdn.microsoft.com/en-us/library/ie/ms535869(v=vs.85).aspx javascript browser internet-explorer-11 share|improve this question edited Apr 8 '14 at 14:25 asked Apr 8 '14 at 11:14 Anurag Ratna 5018 http://stackoverflow.com/questions/22935264/issue-with-createrange-method-in-javascript-in-ie11 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote I've experienced lots of issues with IE and text range selection and manipulation. I highly recommend this cross-browser JavaScript range and selection library named, appropriately, rangy: https://code.google.com/p/rangy/ It will handle the obscure edge cases and it works with IE, as well as all other browsers. Have you looked at this other StackOverflow question and accepted answer? Unable to get property 'createRange' of undefined or null reference share|improve this answer edited Apr 8 '14 at 14:51 answered Apr 8 '14 at 14:31 Scott 2,2561926 1 yes,i first looked into the solution given in stackoverflow.com/questions/19748500/… link but this is not working for me. In my project,i am bound to not use any external js library. Kindly provide some other solution. –Anurag Ratna Apr 8 '14 at 18:03 Are you operating on iframes? Why do you use this._document.selection instead of window.document.selection? You are right to try window.getSelection() as a backup to window.document.selection. Perhaps you need to retrieve the selection from the document's .contentDocument or .contentWindow.document or .ownerDocument if you are dealing with iframes. –Scott Apr 9 '14 at 18:53 add a comment|
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/ASP.NET AJAX + Ajax Control Toolkit/I get the error "Unable to get property 'createRange' of undefined http://forums.asp.net/t/1995673.aspx?I+get+the+error+Unable+to+get+property+createRange+of+undefined+or+null+reference+upon+entering+any+text+into+a+combobox+using+Internet+Explorer+11+ or... I get the error "Unable to get property 'createRange' of undefined https://social.msdn.microsoft.com/Forums/ie/en-US/138e9cbc-aee7-46fc-bb7e-c5112e88497a/unable-to-get-property-createrange-of-undefined-or-null-reference?forum=ieextensiondevelopment or null reference" upon entering any text into a combobox using Internet Explorer 11. [Answered]RSS 4 replies Last post Jul 09, 2014 09:27 AM by JAYHAWKER ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced unable to Search Related Links GuidanceVideos Reply JAYHAWKER Participant 1055 Points 2440 Posts I get the error "Unable to get property 'createRange' of undefined or null reference" upon enteri... Jul 08, 2014 10:53 AM|JAYHAWKER|LINK I created a combobox, and without any code, client side or server side, entering any text into the Combobox gives me the following error. Unable to unable to get get property 'createRange' of undefined or null reference It only happens using Internet Explorer. With Chrome, I don't get an error, but events don't fire. Any ideas? Reply MetalAsp.Net All-Star 101939 Points 20711 Posts Moderator Re: I get the error "Unable to get property 'createRange' of undefined or null reference" upon en... Jul 08, 2014 11:03 AM|MetalAsp.Net|LINK I just noticed this problem myself, and am using IE11. I googled and found this: http://forums.asp.net/t/1924806.aspx?Unable+to+enter+data+into+a+combo+box+control Troubling... Edit: Read the very last post. The marked as answer post is wrong. C# <--> VB.Net |jQuery Widgets Reply JAYHAWKER Participant 1055 Points 2440 Posts Re: I get the error "Unable to get property 'createRange' of undefined or null reference" upon en... Jul 08, 2014 03:31 PM|JAYHAWKER|LINK With chrome and the combobox, the client side events won't fire. If I run the application in debug mode and use Internet Explorer, everything works flawlessly. Very strange! Reply chetan.sarod... All-Star 48403 Points 12165 Posts Re: I get the error "Unable to get property 'createRange' of undefined or null reference" upon en.
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana Bing Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center Windows Dev Center Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: 'Unable to get property 'createRange' of undefined or null reference Internet Explorer Development > Internet Explorer Extension Development Question 0 Sign in to vote The following code, which worked well right up until I upgraded to windows 8.1, is now throwing an error: "Unable to get property 'createRange' of undefined or null reference"
var SelectedData = window.external.menuArguments.document.selection.createRange().text