Change the Size of a List Collector Slushbucket Variable

alhicks
Tera Guru

I've tried the Catalog Client Script from the svc now guru website and it doesn't seem to work for me. All I changed was my variable name in the script below and the size of the list collector did not change any. Any ideas what would cause this Catalog Client Script NOT to work for me.

http://www.servicenowguru.com/scripting/client-scripts-scripting/change-size-list-collector-slushbuc...

function onLoad(){
var varName = 'YOUR_VARIABLE_NAME_HERE';
var height = '10'; //Optional
var width = '250'; //Optional
//Get the left and right bucket input elements
var leftBucket = gel(varName + '_select_0');
var rightBucket = gel(varName + '_select_1');
if(height && g_form.getControl(varName)){
//Adjust the bucket length (default is 18)
leftBucket.size = height;
rightBucket.size = height;
}
if(width && g_form.getControl(varName)){
//Adjust the bucket width (default is 340)
leftBucket.style.width = width;
rightBucket.style.width = width;
}
}

27 REPLIES 27

drewc
Mega Contributor

demo12.service-now.com


Looks like it's going to be a support issue. Demo looks fine. It's most likely a config or version issue with your instance.


drewc
Mega Contributor

well after digging all afternoon, i've come to the conclusion that our struggles on this one are self-inflicted.
we've got some other js and ajax stuff going on inside an onload script that we need to figure out.
when i comment that stuff out, we don't have a rendering problem with the slushbucket.

i also found a ui script a colleague had created that was setting the width to 700 pixels upon update of
the bucket... so changing that to 300 at least fixed the issue of the "from bad to worse" rendering we were
having on update...

thanks again!
~drew


ashik1
Kilo Guru

Hi guys,



Above mentioned catalog client script is working fine in Dublin but not in Eureka.


Hi,


I got the solution, for the above script need to add 'px' to the value


eg.var width='250px'