in Google chrome the event fires .change jQuery


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
17 views
Have a nice day, the trouble I have.

there is a form
in it 3 fields



mySearch (); is a JS function search outputs using Ajax part of the table results

there is a function that monitors when the item loses focus and searches for changed data
$(' #id_sub, #brand , #pname ').change( function() { mySearch(); }); 


Now the fun part, go to the website, where it's all happening.
choose the first field event is triggered, a search is performed the content is updated
write in the box brand olay for example I press tab, the event does not run, write anything. for example one character and hit TAB, the search is performed.



My question is why the average field does not fire the change event, it does not work in Chrome, FF and Opera all is normal, IE you do not have at hand, not looking how it behaves there.

in Google a lot of topics with this discussion, but it does not help me.

how to be? what are the solution methods?

the page is here (kind of not kick the debug thing no more)

let me remind you, we choose the field "category" is "Acne" click tab
in the second box write "olay" tab click do not detect. in the third field write anything such as "a" and set the table search occurs.

the search function here a little fancy that a search function added for js pager

 var search_result = []; var item_per_page = 5; function mySearch(id_sub, brand, pname){ if (!id_sub) id_sub = $( '#id_sub' ).val(); if (!brand) brand = $( '#brand' ).val(); if (!pname) pname = $( '#pname' ).val(); $.ajax({ type: 'GET', url: '/ajax/content/', data: 'id_sub=' + id_sub + '&brand=' + brand + '&pname=' + pname, success: function(msg){ search_result = []; //$( '#results' ).html(''); $.each($.parseJSON(msg), function (i, f) { var farr = [ f.ctegory, f.sub_category, f.brand, f.id, f.product_name, f.avg_score ]; search_result[search_result.length] = farr; }); $("#Pagination").pagination(search_result.length, { items_per_page: item_per_page, callback:pageselectCallback, prev_text:'PREV', next_text:'Trace.', load_first_page: true }); } }); } pageselectCallback function(page_index, jq) { // Get number of elements per pagionation page from form var items_per_page = item_per_page; var max_elem = Math.min((page_index+1) * items_per_page, search_result.length); var newcontent = ''; // Iterate through a selection of the content and build an HTML string for(var i=page_index*items_per_page;i'; '\\ '+search_result[i][0]+' -> '+search_result[i][1]+'\\ '+search_result[i][2]+'\\ '+ search_result[i][4] + '\\ '+ search_result[i][5] + '\\ \\ '; } newcontent += ''; // Replace old content with new content if(search_result.length == 0) { $('#results').html('no results found, but you can add cosmetics to the directory'); } else $('#results').html(newcontent); // Prevent click eventpropagation return false; }; 
by | 17 views

3 Answers

0 like 0 dislike
The event is triggered, look for a problem in mySearch()
by
0 like 0 dislike
I have Safari and Chrome everything works (on your page). Try to disable extensions (or turn on porn mode :)) and test without them.
by
0 like 0 dislike
And I always thought that the change to select points, and blur for inputof :(
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
5 answers
110,608 questions
257,186 answers
0 comments
28,151 users