<script type="text/javascript">
/*function allSearch() {
var mas=$('.sb').map(function(){
return $(this).attr('name');
});
$.each(mas, function(index,value){
$('#'+value).click();f
//alert();
});
}*/
function allSearch() {
$('.sb').filter('[name]').each(function() {
this.click();
});
}
</script>
<td class="left1" colspan="3"><a onclick="allSearch()" class="button">Поиск ссылок</a> <a onclick="filter();" class="button">Фильтр</a></td>
а вот сами ссылки:
<a class="sb" id="<?php echo $product['product_id'];?>" name='<?php echo $product['product_id'];?>' onclick="find_product(<?php echo $product['product_id'];?>, null);">Поиск</a>