'insertAdjacentHTML' is null or not an object

  1. #1

    'insertAdjacentHTML' is null or not an object



    I have a tabpanel with a tab set to hidden (code below) and a button on the page with a click listener - with the below JS keep getting: Message: 'insertAdjacentHTML' is null or not an object

    here is my listener JS:



    function TestCheckBox()


    {


    Tab2.show();


    Tab2.load({url:'Reports/HCPCS.aspx', mode:'iframe', params:{'Criteria':txtCriteria.getValue(), 'Filter':hdnHCPCSFilter.getValue()}});


    }


    Here is my code:


    <ext:TabPanel ID="TabPanel1" runat="server" Plain="true" Border="false" ActiveTabIndex="0"


    Width="940" Height="650" DeferredRender="false" AutoScroll="true" EnableTabScroll="true">


    <Tabs>


    <ext:Tab ID="Tab2" runat="server" Title="test" Hidden="true" AutoDataBind="false">


    <AutoLoad ShowMask="true" />


    </ext:Tab>
  2. #2

    RE: 'insertAdjacentHTML' is null or not an object

    Hi,

    You need use different code. Please see the following example ('Show Tab6' button)
    https://examples1.ext.net/#/TabPanel/Basic/Show_Hide/
  3. #3

    RE: 'insertAdjacentHTML' is null or not an object

    that did it - thanks!
  4. #4

    RE: 'insertAdjacentHTML' is null or not an object

    quick follow-up - how would I, if I wanted to first hide all my tabs - and only show if a checkbox is selected (this part I have) -
    // This is the part I cannot get - how to check if it is visible and the hide it, etc.



    if (Tab2.isVisible()){


    TabPanel1.removeTab(Tab2);


    }




    if (cbHCPCS.checked){


    TabPanel1.addTab(Tab2);


    Tab2.load({url:'Reports/HCPCS.aspx', mode:'iframe', params:{'Criteria':txtCriteria.getValue(), 'Filter':hdnHCPCSFilter.getValue()}});


    myArray[myArray.length] = 1;


    }
  5. #5

    RE: 'insertAdjacentHTML' is null or not an object

    got it with


    TabPanel1.remove(Tab2)

    Thanks again
  6. #6

    RE: 'insertAdjacentHTML' is null or not an object

    Hi,

    I think need
    TabPanel1.remove(Tab2, false) //false is pointing that tab should not be destroyed
  7. #7

    RE: 'insertAdjacentHTML' is null or not an object

    Thanks! Was just trying to figure out where I went wrong...

Similar Threads

  1. Replies: 4
    Last Post: Jul 18, 2011, 5:21 PM
  2. 'this.grid' is null or not an object
    By xtremexploit in forum 1.x Help
    Replies: 4
    Last Post: Jul 04, 2011, 3:34 PM
  3. 'Ext.net.ResourceMgr' is null or not an object
    By harshad.jadhav in forum 1.x Help
    Replies: 3
    Last Post: Jan 14, 2011, 10:01 PM
  4. Ext.fly(...)' is null or not an object
    By kapil gupta in forum 1.x Help
    Replies: 5
    Last Post: Nov 10, 2010, 8:59 AM
  5. Undefined is null or not an object???
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Mar 09, 2009, 11:11 AM

Posting Permissions