The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript click and populate images in grid view Reply To: click and populate images in grid view


You would typically do it with a database that stores the available sizes against each factory name, and then on clicking a link, a query is made to the database that outputs the factories matching the requested criteria. This would be done with a server-side language like PHP and MySQL and would require knowledge (and the means) to setup/populate a suitable database structure, and write the appropriate code to communicate with the database and manipulate the data. If you don’t have that knowledge already, or the time to learn yourself, you’d probably need to hire somebody.

If you’re limited to CSS/HTML, you could also create something similar(ish) and less complex using JavaScript. I wrote an article on a JavaScript filter that uses classes to filter criteria – you might be able to make use of it and fudge around with it to suit your needs. Here’s the article and here’s the final demo

Instead of the coloured boxes, you would have your factory logos, and the radios/classes would be the sizes of your tiles. Be aware that classes shouldn’t begin with numbers though, so for your 30 X 30cm tile, the class you use might be ‘cm30x30′ instead of ’30x30cm’.

Hope it helps.