wallace45 Posted July 10, 2017 Share Posted July 10, 2017 Not sure if this has been asked before. I was given this task to make the product categorized according to size, car year, trim, etc. Ex. show results on Moto Metal wheels sizes that will fit selected a certain model of trucks. Like those on Tirerack: http://www.tirerack.com/content/tirerack/desktop/en/wheels.html Any tips or lead will be appreciated. TIA Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 10, 2017 Share Posted July 10, 2017 (edited) You will want to implement an AJAX solution. This is sometimes called a "chained select" implementation. You can google that for some possible solutions. Here are the basics. Implement JavaScript triggers on the Select lists that are parents for the onChange event Whenever a parent select list is changed call a function to: Pass the currently selected value via AJAX to get the list of applicable options for the immediate child select list Empty out the options from the child and grandchildren select lists, then replace the options for the immediate child element You need to decide whether you want a "select one" as the default option when populating the options of a child element (I would) or if you want to default to the first valid value. If you do the latter, you need to run the same process on that child element, and the next (recursively), until all parent/child elements are run. Edited July 10, 2017 by Psycho 1 Quote Link to comment Share on other sites More sharing options...
wallace45 Posted July 11, 2017 Author Share Posted July 11, 2017 Great Psycho! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.