title: Microsoft JScript runtime error: 'null' is null or not an object
body: <p>I have application like where i can create dynamic tabs. and delete cross bar option on tabs. When I am trying to delete the tab I am getting error like</p>
  
  <p>Microsoft JScript runtime error: 'null' is null or not an object and point to my Javascript code.</p>
  
  <p>Here is my JS code.</p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
          /* &lt;![CDATA[ */
          function deleteTab(tabText)
          {
              var tabStrip = $find("&lt;%= RadTabStrip1.ClientID %&gt;");
              var multiPage = $find("&lt;%= RadMultiPage1.ClientID %&gt;");
              var tab = tabStrip.findTabByText(tabText);
              var pageView = tab.get_pageView();
  
              var tabToSelect = tab.get_nextTab();
              if (!tabToSelect)
                  tabToSelect = tab.get_previousTab();
  
              tabStrip.get_tabs().remove(tab);
              multiPage.get_pageViews().remove(pageView);
  
              if (tabToSelect)
                  tabToSelect.set_selected(true);
          }
          /* ]]&gt; */
  &lt;/script&gt;
  </code></pre>
  
  <p>and in page lode</p>
  
  <pre><code>    if (!Page.IsPostBack)
      {
          RadTab tab = new RadTab();
          tab.Text = string.Format("New Page {0}", 1);
          RadTabStrip1.Tabs.Add(tab);
  
          RadPageView pageView = new RadPageView();
          pageView.Height = new Unit("50px");
          pageView.Width = new Unit("1300px");
          RadMultiPage1.PageViews.Add(pageView);
  
          BuildPageViewContents(pageView, RadTabStrip1.Tabs.Count);
          RadTabStrip1.SelectedIndex = 0;
  
      }
  </code></pre>