Hi does any one knows replacement of setInnerHtml function as it doesnot work in Firfox and gives error.
regards,
Hi does any one knows replacement of setInnerHtml function as it doesnot work in Firfox and gives error.
regards,
There's no such function in any browser, so far as I (and Google) are aware. You'd set the innerHTML property of the element instead. However, it's not advised to do so -- use DOM methods instead.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
May Be!........ Actually i am using online web editor (like we are using for this forum) so using Java Script i am setting some value in editor... method innerhtml i think overwrites each time when function is called i dont want previous contents to be removed i want it to be there n a way from which i can insert my text on the this text Area..... So Basic purpose is just to insert some text on the top of textarea with the previous content present there..
regrads,
i m using code like this
FCK.SetInnerHtml = function( html ) // IE Only
{
var oDoc = FCK.EditorDocument ;
oDoc.body.innerHTML = '<div id="__fakeFCKRemove__"> </div>' + html ;
}
Firefox says that SetInnerHtml is not a function but there is no problem in IE... i think there is some problem in function defination.
regards,
Is the // IE Only comment part of the code, or have you added? If the former, I would suspect that that is your problem. If the latter, I must ask whether you are calling SetInnerHtml() or FCK.SetInnerHtml(). Either way, I would recommend you use DOM methods over innerHTML, dropping said editor if it becomes necessary.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Simply do:Code:method innerhtml i think overwrites each time when function is called
But as Twey said, stick to the DOM methods.Code:oDoc.body.innerHTML += ...
- Mike
Thank You for Your Support.... Actually Problem stands here.. Please have a look..
this code is not working for me actually i am not a js expert just beginner so need your help to implement this code please check the code below you may have better idea whats going on..
there is error oEditor.SetInnerHtml(textver1); is not a functionCode:function FCKeditorAPI_GetInstance( instanceName ) { return this.__Instances[ instanceName ] ; } if ( !window.parent.FCKeditorAPI ) { // Make the FCKeditorAPI object available in the parent window. FCKeditorAPI = window.parent.FCKeditorAPI = new Object() ; FCKeditorAPI.__Instances = new Object() ; // Function used to get a instance of an existing editor present in the // page. FCKeditorAPI.GetInstance = FCKeditorAPI_GetInstance ; } and then this Code var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ; var letterText......... oEditor.SetInnerHtml(textver1);
Actually Its FCK Editor App ... You may find complete code by searching on google with keywords "FCKEditor"
regards,
It still overwrites. This is one of the main problems with innerHTML.Simply do:Code:method innerhtml i think overwrites each time when function is calledCode:oDoc.body.innerHTML += ...We'd rather not. This appears to be a question specific to this FCKEditor (which isn't a DD script) and so isn't really appropriate here. I suggest you ask the developers of FCKEditor for support.Actually Its FCK Editor App ... You may find complete code by searching on google with keywords "FCKEditor"
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
FCKEditor is written in JavaScript... So its pure JS Problem i think this is appropiate place for my Question...... Your Help is Always Appriciated.We'd rather not. This appears to be a question specific to this FCKEditor (which isn't a DD script) and so isn't really appropriate here. I suggest you ask the developers of FCKEditor for support.
regards,
No, it's no more a pure JS problem than a problem with Windows is a pure C problem.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks