The WebHtmlEditor may fail to work in IE10, because javascript of WebHtmlEditor used to rely on the document property of htmlElement and that property may not be available. Since there is no updates for versions prior to 2011.1, an application needs to use local js files used by WebHtmlEditor and adjust few lines in those files.
Steps to fix:
1. Create local directory (for example ./js) within a website and copy there ig_htmleditor*.js files, which are provided by installation of NetAdvantage.
2. Point JavaScriptDirectory property of WebHtmlEditor to that location. Example:<ighedit:WebHtmlEditor ID="WebHtmlEditor1" JavaScriptDirectory="./js" ...> ...</ighedit:WebHtmlEditor>3. Open ig_htmleditor.js in any text editor, find line e=e.document; within this._format=function(....) and replace it by e = e.ownerDocument || e.document;
4. Within that file find line if(!t)try{t=src.document.id;}catch(t){} within function iged_mainEvt(e) and replace it by if(!t) try{ t = src.document || src.ownerDocument; t = t.id; }catch(ex){ t = null; }
5. Open ig_htmleditor_ie.js file in any text editor, find line o._doc=function(){return this._elem.document;} and replace it by o._doc = function(){ return this._elem.ownerDocument || this._elem.document; }
Hi Victor
I want to set focus to my WebDateChooser control "wdcStartDate".
i tried the below code
document.getElementById("wdcStartDate").focus();
ig_controls.wdcStartDate.setFocus();
but i'm getting the value as undefined or the ig_controls is undefined/not found. I need a fix for it
Please guide me .
Hello Phuc,
Concerning upgrading version for NetAdvantage you or your client would want to acquire a key for a later version and download it from our website. The following link contains contact for our registrations team that can provide you with information concerning upgrading.
http://es.infragistics.com/about-us/contact-us/
If you client is the one with the account and license they would likely be the one to contact our registrations team.
Thanks Viktor,
Actually, I've defined the scripts path in web.config :
<infragistics.web styleSetName="Office2007Blue" styleSetPath="~/ig_res/" javaScriptDirectory="~/scripts/" imageDirectory="~/images/" enableAppStyling="false"/>
So, I tried to move the 4 ig_htmleditor*.js and add the JavaScriptDirectory <ighedit:WebHtmlEditor ... JavaScriptDirectory="../scripts/test/"> but it doesn't recognize the new path, I've tried to change to fixed path but no result (is that correct or I did something wrong?)
At the moment, I've told my clients to press Ctrl + F5 to refresh the cache for bypassing this issue. Can you help to give more information about how to upgrade for latest version of NetAdvantage? My client has bought NetAdvantage long time ago, do I need their account to upgrade ?
Thanks so much.
Hi Phuc,
Last time I gave suggestion to get around some of IE 10 problems in javascript of old versions of WebHtmlEditor. If your application can not use local js files (as replacement of default embedded into dll resources), then the only other option is to upgrade for latest version of NetAdvantage.
About problems with Undo/Redo, list, etc. Most of them are probably can not be fixed. For example, the IE10 dropped support for redo from javascript, Building list is implemented by using execCommand("insertorderedlist/insertunorderedlist"). If IE interprets that statement by not expected way, then WebHtmlEditor is not able to fix that.
Can anyone help, please ?