var us_states = ['AL','AK','AZ','AR','CA','CO','CT','DE','FL','GA','HI','ID','IL','IN','IA','KS','KY','LA','ME',
'MD','MA','MI', 'MN','MS','MO','MT','NE','NV','NH','NJ','NM', 'NY','NC','ND','OH','OK','OR','PA',
'RI','SC','SD','TN','TX','UT', 'VT','VA','WA','WV','WI','WY'],
PayMethod = { 1: "American Express", 2: "Visa", 3: "Mastercard", 4:"Discover", 5:"Check", 6:"PayPal", 7:"Cash", 8:"Money Order"},
MarStat = { 1: "Single", 2: "Married", 3: "Co-habitating", 4:"Seperated", 5:"Divorced", 6:"Widowed"};
$('input[name="t"]').menuoptions({ "Data": PayMethod,
"SelectOnly": true,
"ClearBtn": true,
"ColumnCount": 2
});
$('input[name="t2"]').menuoptions({ "Data": MarStat,
"ClearBtn":true,
});
$('input[name="t3"]').menuoptions({ "Data": us_states,
"ClearBtn":true,
"ColumnCount":6,
"UseValueForKey":true });
$('button.a').off('click');
$('button.a').on('click', function(e) {
var res = $('form#tst').serialize();
var new_get_str = $('input[name=t3]').menuoptions('re_serialize', res);
$('div#serialize_text').html("serialize() result (below):").css({'color':'green'});
$('div#reserialize_text').html("re_serialize result (below):").css({'color':'green'});
$('div#serialize').html(res);
$('div#re_serialize').html(new_get_str);
e.preventDefault();
});