Search code examples
javascriptinfragistics

0x800a138f - JavaScript runtime error: Unable to get property 'scrollHeight' of undefined or null reference


In one of our project, we are using a Infragistics 7.1 and vs2010 before. Recently after the migration of the project to VS2013 and Infragistics 9.1 started getting the below error.

get1stElementByName: elm not found.

tag:th, name:thYear

When checked, it was from this code

function get1stElementByName(tag, name){
  if(document.all){
    var elms=document.getElementsByTagName(tag);
    for(e in elms) if(elms[e]&& elms[e].name==name) return elms[e];
  } else {
    var elms=document.getElementsByName(name);
    if(elms && elms[0]) return elms[0];
  }
  alert('get1stElementByName: elm not found.\ntag:' + tag + ', name:' + name);
  return null;
}

The function doesn't read the tag and returns null.

And the Tag comes from the UltraWebTabs.

I'm not sure why it is not working after migrating from Infragistics 7.1 to 9.1. After migration am i missing anything. please someone help me on this.


Solution

  • The code you're using is from 2009 and was developed to support browser back then. Since then browsers have evolved and this code has changed a lot. The UltraWebTabs control is not supported by Infragistics since 2010. My suggestion would be to migrate to the latest version of Infragistics ASP.NET, which currently is 15.1, and use the new WebTab control which is the modern counterpart of the UltraWebTab and supports all modern browsers.