Hi,

I have the following function:

function serialize(s)
{
   serial = $.SortSerialize(s);
   document.getElementById('serial').value=serial.hash.replace(/sort3\
[\]=/gi, '').replace(/&/g, ',');
};

This returns a string like: 1,2,4,6,8

It is possible that there is nothing to sortserialze, so it returns
nothing. When this is the case, I want it to return a "0" instead of "
", but how to do this?

So if there is nothing to serialze return: 0

Thanks

Reply via email to