Skip to content

Instantly share code, notes, and snippets.

@Javlopez
Created May 3, 2011 22:00
Show Gist options
  • Save Javlopez/954354 to your computer and use it in GitHub Desktop.
Save Javlopez/954354 to your computer and use it in GitHub Desktop.
Un JS
var $selector = $(".combos");
$selector.change(function () {
var $this = $(this);
var $id = this.id;
var elegido=$(this).val();
var combo = $id.toString().split("combo")[1];
var params = {elegido: elegido};
if($id == "combo3"){
params = { elegido: elegido
nacional: $("#combo1").val()
};
}
$.post( "generica_combos.asp?combo="+combo,
params,
function(data){
$("#combo"+combo).html(data);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment