The javascript code I've been using is here
Expand|Select|Wrap|Line Numbers
- var searchStrNew = "";
- function getSearchStrVote(puid, rate, searchStrNew) {
- if (rate == '1'){
- searchStrNew = searchStrNew+"&like="+id;
- }
- if (rate =='0') {
- searchStrNew = searchStrNew+"&hate="+id;
- }
- }
I need to keep track of past inputs locally (as it is user specific, and I have no need to store it in the db.
So if the user selects like, hate, like for items 1,2,3 respectively, the var searchStrNew should equal &hate=1&like=2&hate=3.
The code I have above only returns the last vote.
I'm sure this is super simple, but my searches have come up empty, and I think it should work as I have it (of course, I've tried minor changes ad still can't get it going).