General Question

ETpro's avatar

Name that Script. Can you help me find a JavaScript for this?

Asked by ETpro (34563points) April 12th, 2010

This probably already exists, but I am not sure what to call it to Google for it. If you know of such a script, or even what to call it, that would steer me to a successful search.

What I want to do is put a checkbox beside each thumbnail and product description on the section pages of the website. I want to put a “I Liked These” section at the top of the right column, and each time a user clicks a checkbox beside an item, add a copy of it to the “I Liked These” list on the right. Here is a sample of a page I’d like to put this on.

I am not looking for a voting system. This is for an individual user. Say a large section has 200 products in it. I paginate it into 10 pages of 20 items each. By the time a user gets to page ten, they realize the items they liked best were back on one of those previous pages. So now they have to click back through and hunt for each one they liked. I want them to be able to mark things they really like, and collect them in the right column as the page through, so when they are done, they have a collection of their favorites to select from instead of having to page back and forth, or view all and scroll forever.

This is going to be installed on a Yahoo Store, where there is no active server-side language available at run time. So it has to be done entirely client side. And given the single user focus, I see no reason to make it database dependent anyway. I would use cookies to preserve the list for a return visit by the same user. And I would build in a way they can dump the cookie after they are done looking at a set of favorites. Also let them remove and add to the favorites column at will.

Is there something already out there I can start with, or do I need to code this up from scratch? Looking for suggestions on how to proceed.

Observing members: 0 Composing members: 0

8 Answers

njnyjobs's avatar

Sounds similar to a “Recently Viewed Items” script or module. However, you can also use a shopping cart module to set the items aside for review.

ETpro's avatar

@njnyjobs Humm. That’s a good thought. It might be possible to customize either of those.

It occurred to me that instead of checkboxes to add to the collection, it might be more fun to be able to drag and drop items into the collection, or back out of it if you have reuled them out. Not sure which user interface people would prefer, and find more intuitive.

anartist's avatar


anartist's avatar

Look on dynamic drive or other script developer sites. If you can’t find it, one of the developers in the forums might write the code for you for a reasonable fee.

anartist's avatar

DOM Drag & Drop script FF1+ IE5+ Opr7+
Try this one from the Dynamic Drive Website
This is a no fuss DOM drag script that be used on any relatively or absolutely positioned element on the page to make it instantly dragable. The script also fires 3 custom event handlers that let your page sense and react to the dragging in some fashion.

ETpro's avatar

@anartist Thanks. I did look at that script. For reasons of layout, I would prefer to seep the DIVs on the section page not positioned but floated. Actually, right now they are in a table, but part of the project is to make them DIVs and float them so that the fluid-width design of the site is used to maximum advantage, with as many columns displayed in section pages as will fit based on the user’s screen width.

The basic idea of drag-and-drop is very appealing, but I don’t think true drag-and-drop is going to get me where I want to go. The right column has to contain items from multiple paginated pages, and I don’t want them positioned wherever the user may drop them thre, but want them to pop into a nice, orderly column orientation.

I posted on the JavaScript forum as well. I keep thinking this is such an obvious thing to do someone must have already done it. But if not, I will have to get it coded up. I have a cookie-based Recently Viewed Items script I could modify for the purpose.

anartist's avatar

Have you looked at the code on the open-source shopping carts like ZenCart or OScart?

ETpro's avatar

Actually, I have a Recently Viewed Items script that comes even closer than typical cart scripts to what I want. If I can’t find a preexisting script designed for what I want, the fallback will be to modify my Recently Viewed Items script.

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther