Hello,
I reported an issue some weeks ago on a javascript error that blocks our application.
Now I figured out what the reason is for this error. The solution on the other hand is unknown and may be something tricky. So I hope you can find it out because my projectleader has pulled out all of his hair from frustration. I'm afraid my hair is next as long as the problem continues.
Ok the reason/scenario:
make a sample project with a page that dynamically creates a usercontrol and each time there is a postback (Ajax or not) you'll have to build the usercontrol from zero.
On the usercontrol set a control e.g. radcombobox and fill it up with 250 items (so the server will have something to process).
Create a button beneath it that will trigger a refill of the combobox.
Make a loadingpanel and a radajaxmanager that will update a panel which only contains the dropdown. Make sure the button does not belong in the panel so it is clickable during the loadingscreen.
No click that button as hell, as fast as you can and then the following error will occur in javascript:
_d5.parentNode is null where 5 is a sequence.
I traced it back in the javascript of telerik so this might help in the search:
1810 var _d2=$get(_d1);
1811 var _d3=String.format("{0}_wrapper",_d1);
1812 var _d4=$get(_d3);
1813 if(_d4){
1814 _d2=_d4;
1815 }
1816 if(this.get_element()==null){
1817 return;
1818 }
1819 var _d5=(!this._isSticky)?$get(this.get_element().id+_d1):this.get_element();
1820 var now=new Date();
1821 if(_d5==null){
1822 return;
1823 }
1824 var _d7=now-_d5._startDisplayTime;
1825 var _d8=this._minDisplayTime;
1826 if(this._isSticky){
1827 if(_d8>_d7){
1828 window.setTimeout(function(){
1829 _d5.style.display="none";
1830 },_d8);
1831 }else{
1832 _d5.style.display="none";
1833 }
1834 }else{
1835 if(_d8>_d7){
1836 window.setTimeout(function(){
1837 _d5.parentNode.removeChild(_d5);
1838 if(typeof (_d2)!="undefined"&&(_d2!=null)){
1839 _d2.style.visibility="visible";
1840 }
1841 },_d8);
1842 }else{
1843 _d5.parentNode.removeChild(_d5);
1844 if(typeof (_d2)!="undefined"&&(_d2!=null)){
1845 _d2.style.visibility="visible";
1846 }
1847 }
1848 }
the error occurs on line 1837
Hope this helps because I really love my hair,
Thanks in advance,
the SOFIM-team (Belgium)
I reported an issue some weeks ago on a javascript error that blocks our application.
Now I figured out what the reason is for this error. The solution on the other hand is unknown and may be something tricky. So I hope you can find it out because my projectleader has pulled out all of his hair from frustration. I'm afraid my hair is next as long as the problem continues.
Ok the reason/scenario:
make a sample project with a page that dynamically creates a usercontrol and each time there is a postback (Ajax or not) you'll have to build the usercontrol from zero.
On the usercontrol set a control e.g. radcombobox and fill it up with 250 items (so the server will have something to process).
Create a button beneath it that will trigger a refill of the combobox.
Make a loadingpanel and a radajaxmanager that will update a panel which only contains the dropdown. Make sure the button does not belong in the panel so it is clickable during the loadingscreen.
No click that button as hell, as fast as you can and then the following error will occur in javascript:
_d5.parentNode is null where 5 is a sequence.
I traced it back in the javascript of telerik so this might help in the search:
1810 var _d2=$get(_d1);
1811 var _d3=String.format("{0}_wrapper",_d1);
1812 var _d4=$get(_d3);
1813 if(_d4){
1814 _d2=_d4;
1815 }
1816 if(this.get_element()==null){
1817 return;
1818 }
1819 var _d5=(!this._isSticky)?$get(this.get_element().id+_d1):this.get_element();
1820 var now=new Date();
1821 if(_d5==null){
1822 return;
1823 }
1824 var _d7=now-_d5._startDisplayTime;
1825 var _d8=this._minDisplayTime;
1826 if(this._isSticky){
1827 if(_d8>_d7){
1828 window.setTimeout(function(){
1829 _d5.style.display="none";
1830 },_d8);
1831 }else{
1832 _d5.style.display="none";
1833 }
1834 }else{
1835 if(_d8>_d7){
1836 window.setTimeout(function(){
1837 _d5.parentNode.removeChild(_d5);
1838 if(typeof (_d2)!="undefined"&&(_d2!=null)){
1839 _d2.style.visibility="visible";
1840 }
1841 },_d8);
1842 }else{
1843 _d5.parentNode.removeChild(_d5);
1844 if(typeof (_d2)!="undefined"&&(_d2!=null)){
1845 _d2.style.visibility="visible";
1846 }
1847 }
1848 }
the error occurs on line 1837
Hope this helps because I really love my hair,
Thanks in advance,
the SOFIM-team (Belgium)