I have a page which shows search results, and i want a user to be able to add each item to the wishlist if they choose.
So, I use the following to call the page:
<div id=wishlist_icon<? echo $div_num; ?>><!-- div_num is increased by 1 everytime to load file into its own div-->
<script type="text/javascript">
$('#wishlist_icon<? echo $div_num; ?>').load(
'/add_wishlist_search.php?num_ie=<? echo $random_num_for_ie; ?>',
{ userfromcookie:"<? echo $userfromcookie; ?>",
PRid:"<? echo $databack3[PRid]; ?>",
cat_id:"<? echo $databack3[prodcatID]; ?>",
item:"<? echo $title; ?>",
div_num:"<? echo $div_num; ?>"
}
);
</script>
</div>
They all load fine but the script actually only works on the first item in each of the search results. Even then it loads all the items on the page onto the wishlist.
Is there a way to do this?