innerHTML of document

Last post 09-13-2005, 4:25 PM by Pintod. 4 replies.
Sort Posts: Previous Next
  •  09-13-2005, 4:10 PM 10510

    innerHTML of document

    Hi,
       we set the innerHTML of the document. It shows it and then just goes away.
     
    WHY???
  •  09-13-2005, 4:17 PM 10511 in reply to 10510

    Re: innerHTML of document

    Do you have the same problem in the following link?
     
     
    If not, can you post your code?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-13-2005, 4:20 PM 10512 in reply to 10510

    Re: innerHTML of document

    I do .getDocument() of the CuteEd to get the document and then use the innerHTML to set the inner HTML but no use???? Sometimes shows well.
  •  09-13-2005, 4:23 PM 10513 in reply to 10512

    Re: innerHTML of document

    No I don't have the same problem.
     
    My Code is here...
     
     <%@ Register TagPrefix="ce" Namespace="CuteEditor" Assembly="CuteEditor" %>  function On_Load() { //Get the cuteEditor Object and set the focus :) var CuteEd = new RichEditor("NoteEditor"); //Cell id and formated cell id. var cellId = document.all["hControlID"].value; var FcellId = document.all["hFControlID"].value; var cellValue; var cellFValue; //This is for formated text. switch(wParent.document.all[cellId].tagName) { case "TD": //Grid Cell cellValue = wParent.document.all[cellId].innerText; cellValue = ltrim(rtrim(cellValue)); //trim the sides please if(FcellId != null) { cellFValue = wParent.document.all[FcellId].innerHTML; cellFValue = ltrim(rtrim(cellFValue)); //trim the sides please } RequireParse = true; break; case "INPUT": //TextBox, Input control, etc. cellValue = wParent.document.all[cellId].value; cellValue = ltrim(rtrim(cellValue)); //trim the sides please RequireParse = false; break; default: cellValue = wParent.document.all[cellId].innerHTML; cellValue = ParseFromHtml(cellValue, 'all'); cellValue = ltrim(rtrim(cellValue)); //trim the sides please RequireParse = true; break; } //Remove and  ------------------------- re = new RegExp("&#160;","ig"); cellValue = cellValue.replace(re," "); cellFValue = cellFValue.replace(re," "); //----------------------------------------- document.all["hOldValue"].value = encodeURIComponent(cellValue); document.all["hOldValueFText"].value = encodeURIComponent(cellFValue); //We need to put the cellFValue var realId = "CE_" + "NoteEditor" + "_ID"; var richEd = document.getElementById(realId); var richDoc = null; if(richEd == null || richEd == "undefined") return; var richDoc = richEd.GetDocument(); richDoc.body.innerHTML = cellFValue; CuteEd.setFocus(); var newValue = document.all["hNewValue"].value; var newFValue = document.all["hNewValueFText"].value; if (newValue != "dummy-new-value" && newFValue != "dummy-new-value") { newValue = ltrim(rtrim(newValue)); newFValue = ltrim(rtrim(newFValue)); var returnData = new Array(document.all["hControlID"].value, document.all["hFControlID"].value, newValue, newFValue, document.all["hParam1"].value, document.all["hParam2"].value); //if exists, update PageDirty flag on the caller's page if (wParent.document.all["hPageDirty"] != undefined) wParent.document.all["hPageDirty"].value = "1"; // return data to the DialogContainer window.parent.ReturnDataFromDialog(returnData); } }
  •  09-13-2005, 4:25 PM 10514 in reply to 10513

    Re: innerHTML of document

    Adam:
     In your example the cuteEditor already exist and hence u click and button hve onclick event fired and do something. Try doing in onload like setting innerHTML on load.
     
    It works only sometimes.>>>>>:)
View as RSS news feed in XML