I am using this technique: is there a way to hold the values? - lost in postback
After it does the postback, how do I set which item is selected?
$(document).ready(function() {
if (document.getElementById("txtHidData").value != "")
$("#country").val(document.getElementById("txtHidData").value);
//or
//$("#country")[0].selectedIndex = document.getElementById("txtHidData").value;
Does not work either way, any help? Thanks.
EDIT:
$("#country").change(function() {
debugger
var _selected = $("#country option:selected").val();
document.getElementById("txtHidData").value = "";
document.getElementById("txtHidData").value = _selected;
// $("#txtHidData").value = _selected;
....
`s? – Matt Ball Apr 20 '10 at 17:33