Uncaught TypeError: Cannot read property 'style' of undefined while using colspan
Uncaught TypeError: Cannot read property 'style' of undefined while using colspan
narayanang27
Posts: 1Questions: 0Answers: 0
[code]
<!DOCTYPE HTML>
Engine
Browser
Platform
Version
Grade
Engine1
sub - engine1
Browser1
Platform1
Version1
Grade1
[/code]
after applying datatable plugin for the above table (colspan used table) it gives an error
[quote] Uncaught TypeError: Cannot read property 'style' of undefined in line no.3255 (line mentioned below) [/quote]
[code]
nThs[i].style.width = o.aoColumns[iVis].sWidth;
[/code]
I applied a validation line for that like
[code]
if(nThs[i] !== undefined)
nThs[i].style.width = o.aoColumns[iVis].sWidth;
[/code]
and it works fine!!!!
[quote] Is that ok Alan? If so please recommend it to others to use [/quote]
<!DOCTYPE HTML>
Engine
Browser
Platform
Version
Grade
Engine1
sub - engine1
Browser1
Platform1
Version1
Grade1
[/code]
after applying datatable plugin for the above table (colspan used table) it gives an error
[quote] Uncaught TypeError: Cannot read property 'style' of undefined in line no.3255 (line mentioned below) [/quote]
[code]
nThs[i].style.width = o.aoColumns[iVis].sWidth;
[/code]
I applied a validation line for that like
[code]
if(nThs[i] !== undefined)
nThs[i].style.width = o.aoColumns[iVis].sWidth;
[/code]
and it works fine!!!!
[quote] Is that ok Alan? If so please recommend it to others to use [/quote]
This discussion has been closed.
Replies
Allan