I have an ajax search that filters as I type. It works great in chrome and firefox. However, no matter what data you send, IE always returns the same response. Why is this? Below is the code:
var cardSearch = $('<div>').addClass('card_search').appendTo($('body')).hide().css({'position': 'absolute', 'width': '350px', 'height': '300px', 'background': '#D5D5D5', 'padding': '10px'}).append( $('<div>').css({'background': 'whiteSmoke', 'padding': '5px', 'height': '290px', 'position': 'relative'}).append( $('<input>').css('width', '250px').bind('keyup', function(e){ $.post('http://api.redemptionconnect.com/cards/find/?a=' + Math.random(), {data: {title: $(this).val(), limit: 10, page: 1}}, function(r){ $('ul', cardSearch).empty(); for( var i = 0; i < r.data[0].length; i++ ) $('ul', cardSearch).append( $('<li>').append( $('<a>').attr('href', 'javascript:void(0)').html(r.data[0][i].Card.title + ' (' + r.data[0][i].CardSet.abbreviation + ')').attr('card_id', r.data[0][i].Card.id).mouseover(function(){showCardTooltip(this);}) ).css({'padding': '5px', 'border-bottom': '1px solid #ccc'}) ); }, 'json'); }), $('<button>').html('Search').css({'width': '70px', 'margin-left': '10px'}), $('<hr>').css('margin-bottom', 0), $('<ul>').css({ 'list-style-type': 'none', 'margin': 0, 'padding': 0, 'width': '100%' }) ) );
In chrome and firefox, the output is correct. In IE, the output is always the same, no matter what you type. I'm not sure what else to include. You can see how it works at http://redforum.blackfireweb.com and click on the "Search Maps" menu button.
source share