daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest May 16th, 2018 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function doSelectAll(){
  2. var key = $("#keyword").val().trim();
  3. var count = $("#sCount").val().trim().toLowerCase();
  4. var SACcount = $("#sCount").val().trim().toLowerCase();
  5. var world = $("#sAllWorld").val();
  6. if(!key){
  7. $("#sAllResult").html('<br><strong style="color:red";><i>Please Fill In All Fields</i></strong>');
  8. return;
  9. }else if(!count){
  10. $("#sAllResult").html('<br><strong style="color:red";><i>Please Fill In All Fields</i></strong>');
  11. return;
  12. }else{
  13. $("#sAllResult").html('');
  14. }
  15. var arr = [];
  16. $("table[class='maintable'] td:contains('"+key+"')").each(function(){
  17. arr.push(this.id);
  18. });
  19. $.each(arr,function(i,val){
  20.   if(count == "max"){
  21.   var last = $("select[name='count_"+val+"'] option:last-child").val();
  22.   $("select[name='count_"+val+"']").val(last);
  23.   }else{
  24.   var last = $("select[name='count_"+val+"'] option:last-child").val();
  25.   if(count > last)
  26.   count = last;
  27.   $("select[name='count_"+val+"']").val(count);
  28.   count = SACcount;
  29.   }
  30.   $("select[name='world_"+val+"']").val(world);
  31.  });
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top