[CLOSED] Content Update problem

  1. #1

    [CLOSED] Content Update problem

    I have the following code as part of a border layout in my main.aspx file :
    <ext:Panel ID="Panel7" runat="server">
    <div class="content">
    <p>Please use the navigation on the left to browse the site</p>
    <p>If you need any help please contact us</p> 

    I want to change/update the content the content div from my custom Javascript.

        <div class="content">
    I am doing :

        var a = Ext.getCmp('Panel7').body.dom;
        a.innerHTML = '<div class="content"> + somecontent + '
    I want to avoid having to put the wrapper div everytime. Is there a way I can just change what is inside the div. I used the
    But it doesn't work in IE 7. Please help. Thanks
  2. #2

    RE: [CLOSED] Content Update problem

    Hi sz_146,

    If you're are adding html inside the <Content> tags a with a unique ID is automatically created. It might be easiest to just use that and not add another <div class="content"> wrapper.

    To get an instance of the <Content> , append the string "_Content" to .ClientID of the Panel.

    Once you have an instance of a , use the .update() function to set the innerHTML.

    The following code sample demonstrates how to get an instance of the default body and update the content.


    Ext.get('Panel1_Content').update('some content here');
    With the release of v0.7 we have changed the <Content> tag to <Body> and the above code can be simplified using the following code sample.


    Panel1.getBody().update('some content here');
    More information re: the switch to <Body> can be found at <A href="http://forums.ext.net/showthread.php?threadid=2938-12-1.aspxHope">http://forums.ext.net/showthread.php...2938-12-1.aspx

    </A>Hope this helps.
    Geoffrey McGill
  3. #3

    RE: [CLOSED] Content Update problem

    Sorry for a late reply Geoffery and thanks you.

Similar Threads

  1. Replies: 0
    Last Post: Oct 19, 2010, 7:39 AM
  2. [0.8] Update content with AjaxEvent.
    By mojo in forum 1.x Help
    Replies: 0
    Last Post: Oct 14, 2010, 3:01 PM
  3. [CLOSED] How to update panel content during directevent
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 06, 2010, 1:32 PM
  4. [0.8.2] Update Content
    By thchuong in forum 1.x Help
    Replies: 2
    Last Post: Jun 18, 2010, 2:31 AM
  5. [CLOSED] Update TabPanel content without activating
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 07, 2009, 1:47 PM

Posting Permissions