Re: How to get instance of editor wrapped in UserControl?

  •  12-17-2008, 12:50 PM

    Re: How to get instance of editor wrapped in UserControl?

    Hi Adam,
     
    I tried this but as I mentioned earlier that I have created a usercontrol that is myUserControl and I placed cuteEditor control in it. Now when I try to to get the instance of editor I have to use name of control and in my case the name is something like
     ctl00$myUserControl$xyz$Editor2
     
    First case:
     
    if I pass this to in following code
    var editor1 = document.getElementById('<% = ctl00$myUserControl$xyz$Editor2.ClientID%>');
     
    Then it is giving the editor1 =Null or undefined.  
     
    Second case:
    Next if I try to get the instance by calling following code
    var editor1 = document.getElementById('ctl00$myUserControl$xyz$Editor2');
     
    Then I get the object instance. but with this I could not Get the method editor1.getHTML. Only I can get is methods like
    editor1.innerHTML or editor1.value. But this gives me junk characters along with the actual content.
     
    So either I should get some way to execute the case 1 code correctly  so that I can get the GetHTML method or some way for case 2 to get the proper content.
     
    Thanks
     
     
     
     

     

View Complete Thread