Jump to content


Photo

Using Javascript To Sort Static HTML


  • Please log in to reply
25 replies to this topic

#21 Mark

Mark

    Young Padawan

  • Members
  • Pip
  • 113 posts

Posted 27 February 2011 - 05:39 PM

Sorry for the delayed response, this weekend has been pretty hectic for me. So, is the next step in this process actually getting a working item display page?

#22 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 27 February 2011 - 08:03 PM

Pretty much. Otherwise i can just sort of hash out the same "algorithm" that i gave you in my first post with a couple of extra steps for filtering.

#23 Mark

Mark

    Young Padawan

  • Members
  • Pip
  • 113 posts

Posted 28 February 2011 - 02:08 AM

Ah, another question that I had:

If an item has multiple sizes, how will that be possible?

<li brand="bauer" color="black" size="5 6 7 8 9 10 11">


#24 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 28 February 2011 - 06:52 PM

Unless you list out each size individually, rather than grouping them into a single line-item like that, then you won't be able to sort by size. You can still make a filter that would match though, and the example you have there would work perfectly for that.

#25 Mark

Mark

    Young Padawan

  • Members
  • Pip
  • 113 posts

Posted 01 March 2011 - 05:57 AM

Unless you list out each size individually, rather than grouping them into a single line-item like that, then you won't be able to sort by size. You can still make a filter that would match though, and the example you have there would work perfectly for that.


I still don't think I've fully grasped the difference between sorting and filtering, but fair enough. I like how Zappo's does it, on that front. http://www.zappos.co...hletic-shoes~cB

On the left navigation bar, below theme, color, and brand, they have size. You click on a size and it (filters/sorts) the results, displaying only shoes that are designated size.

#26 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 02 March 2011 - 11:41 PM

Yep we could do that. If you don't understand the difference between sorting and filtering, you really should go back and re-read my example. If it still doesn't make sense, then consider this: It would sound really strange to tell somebody to pick up their cigarette sorter after they flick the butt of their cigarette on to the ground. That's because it's not a sorter, it's a filter, it removes stuff from the smoke before you inhale it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users