Re: Using jQuery to access getHTML

  •  11-24-2009, 10:28 AM

    Re: Using jQuery to access getHTML

    Hello Ken,
     
    Would jQuery interfere with the retrieveal of the HTML code?  I'm going to post my code below so  you can see exactly what i'm doing.
     
     
    <script type="text/javascript" language="javascript">

    $(document).ready(function() {

    // Tabs

    $('div[id$="_pnlTabs"]').tabs({ fx: { height: 'toggle', opacity: 'toggle', duration: 'fast'} });

    // Accordion

    $("#NewsletterHTML").accordion({ header: "h3" });


    if
    ($('div[id$="_pnlTabs"]').length) { // Load only on update or create

    var HTMLBodyEnglish = document.getElementById('<%= txtEditorEnglish.ClientID%>').getHTML();

    var test = HTMLBodyEnglish.innerHTML;

    // retrieving the content of Cute Editor as HTML

    //var content = HTMLBodyEnglish.getHTML();

    //alert(content);

     

    }

     

     

    });

    </script>
     

    <div id="tabs-1">

    <!-- Accordion -->

    <div id="NewsletterHTML">

    <div>

    <h3>

    <a href="#">English</a></h3>

    <div>

    <table class="tblTable" id="Details">

    <tr>

    <td class="tblLabel">

    Heading (English)

    </td>

    <td class="tblValue">

    <asp:TextBox ID="txtHeadingEnglish" runat="server" CssClass="MaxWidth" MaxLength="150"></asp:TextBox>

    </td>

    <td class="tblError">

    </td>

    </tr>

    <tr>

    <td class="tblValue" colspan="3">

    <CE:Editor ID="txtEditorEnglish" runat="server" Height="500" Width="100%" ShowBottomBar="true"

    EnableContextMenu="True" AutoConfigure="Default" BreakElement="P">

    </CE:Editor>

    </td>

    </tr>

    </table>

    </div>

    </div>

    <div>

    <h3>

    <a href="#">French</a></h3>

    <div>

    <table class="tblTable" id="Table3">

    <tr>

    <td class="tblLabel">

    Heading (French)

    </td>

    <td class="tblValue">

    <asp:TextBox ID="txtHeadingFrench" runat="server" CssClass="MaxWidth" MaxLength="150"></asp:TextBox>

    </td>

    <td class="tblError">

    </td>

    </tr>

    <tr>

    <td class="tblValue" colspan="3">

    <CE:Editor ID="txtEditorFrench" runat="server" Height="500" Width="100%" ShowBottomBar="true"

    EnableContextMenu="True" AutoConfigure="Default" BreakElement="P">

    </CE:Editor>

    </td>

    <%--<td class="tblError"></td>--%>

    </tr>

    </table>

    </div>

    </div>

    </div>

    <table class="tblTable" id="tblActions">

    <tr>

    <td class="tblValue" colspan="3">

    <asp:Button ID="btnPublish1" runat="server" Text="Publish" OnClick="Publish" />

    <asp:Button ID="btnSave1" runat="server" Text="Save Now" OnClick="SaveNow" />

    <asp:Button ID="btnDiscard1" runat="server" Text="Discard" CausesValidation="false" OnClick="Discard"

    OnClientClick="BLOCKED SCRIPTreturn confirm('This will discard the draft version of this newsletter');" />

    <div class="DraftSave">

    </div>

    </td>

    </tr>

    </table>

    </div>

     
     
    Can you see anything in here that will be causing the issue?  I've been trying different approaches and even adding the code at the bottom of the page is not working.
     
    Thanks,
     
     

    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.
View Complete Thread