dynamic list with null value in jquery

dynamic list with null value in jquery

I've a function to make a dynamic list.

$sel = $('<select id="Addlst">').appendTo($td); $.each(TableStruct[post].Liste, function (ind, value) { $('<option ' + (ind == 0 ? 'selected="selected "' : "") + ' value="' + value + '">').html(ind).appendTo($sel); });

I use value is a nullable(of integer) VB.net side. In 99.9% of cases, I've no problem. But when I've null value (it's for ranking product) My root is null in DataBase. Then when I ask $('#Addlst').val(); ... I've "null". Someone can help me?


If debugging is the art of removing bugs ... then program is the art of creating