Re: Using jQuery to access getHTML

  •  12-22-2009, 2:11 PM

    Re: Using jQuery to access getHTML

    I'm still having this issue as discribed above.   I'm having trouble using the "getHTML" method with in jQuery...
     
    If you run this..
    1. $(document).ready(function() {   
    2.   
    3. });   
    4.   
    5. function showContent() {   
    6.   
    7. var HTMLBodyEnglish = document.getElementById('<%= txtEditorEnglish.ClientID%>');   
    8.   
    9. var content = HTMLBodyEnglish.getHTML();   
    10.   
    11. alert(content);   
    12.   
    13. }  

    it works; however if you try to access it in side of the doc.ready tag you get an error

    1. $(document).ready(function() {   
    2.     var HTMLBodyEnglish = document.getElementById('<%= txtEditorEnglish.ClientID%>');   
    3.     var content = HTMLBodyEnglish.getHTML();   
    4.     alert(content);   
    5. });  
     
    The error is:
     
     Line: 29
    Error: Object doesn't support this property or method
     
     
    Any help would be great       
     
    Thanks,
    Lee
     
     
     

    Lee Harris
    Programmer & Database Developer

    HLB System Solutions
    50 Malcolm Road
    Guelph, Ontario N1K 1A9
    Phone: 519-822-3450 Ext. 239
    Fax: 519-822-8861
    http://www.hlbsolutions.com

    Disclaimer: The contents of this post are provided "as is". There is not warranty on code found in this post.
    Filed under: ,
View Complete Thread