Im trying to redirect to another page when user hits return.But its not working:
$(function() {
$("#ctl00_ContentPlaceHolder1_txtPopCEP").keypress(function(e) {
var tecla = (e.which) ? e.which : e.keycode;
if (tecla == 13) {
e.preventDefault();
window.location.href = "http://www.chinainbox.com.br/site2010/lojaBuscaResultado.aspx?cep=" + $(this).text() + "&pop=yes";
// __doPostBack('ctl00$ContentPlaceHolder1$ImageButton1', '');
}
});
});
Any ideias?