Hide column when using server side and simple side too

Hide column when using server side and simple side too

pajafumopajafumo Posts: 5Questions: 0Answers: 0
edited August 2012 in Bug reports
Hi Allan, I think you should check the next function, I show me error when I try to hide columns v.1.9.3 and 1.9.4
[code]
function _fnStringToCss( s )
{
if ( s === null )
{
return "0px";
}

if ( typeof s == 'number' )
{
if ( s < 0 )
{
return "0px";
}
return s+"px";
}

/* Check if the last character is not 0-9 */
var c = s.charAt( s.length-1 );
if (c < 0x30 || c > 0x39)
{
return s;
}
return s+"px";

}
[/code]

I try to add this line: var s = new String(s); and everything works fine.

[code]
function _fnStringToCss( s )
{
var s = new String(s); // here the change
if ( s === null )
{
return "0px";
}

if ( typeof s == 'number' )
{
if ( s < 0 )
{
return "0px";
}
return s+"px";
}

/* Check if the last character is not 0-9 */
var c = s.charAt( s.length-1 );
if (c < 0x30 || c > 0x39)
{
return s;
}
return s+"px";

}
[/code]

I hope this will be usefull

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Are you using jQuery UI? There have been reports that if you are using jQuery UI and jQuery 1.8, you need to update to the very latest jQuery UI release. It sounds odd, but this is the function that was throwing an error if you are using an older jQuery UI version.

    Allan
  • pajafumopajafumo Posts: 5Questions: 0Answers: 0
    Yes, you are right, I am usign jquery-ui-1.7.2.custom.min.js and jquery-1.8.0.min.js

    Thanks
This discussion has been closed.