fixed the javascript to get the value you actually want to set.