steady11 Posted September 16, 2011 Posted September 16, 2011 Hi all, i need help on a menu which i have seen on a site, what i need is 2 select menus the first one i will need viewers to filter the products on my website, the first menu will enable them to pick the color, the second will pick the size, now on this kitchen website you can filter products by wht there and and style which is exactly what i need, i have done a "view source" but when putting that view sourced code on my site it does not work as i think there are some missing invisible codes i need. http://www.yewtreedesigns.co.uk/products.php?var=&sId=6 Take a look on that site and look for the drop down select menu starting with: Viewing: Base Units Anyway just wondering if someone can help me get a menu like that, if you notice on the first menu if you select a product it changes the url to: products.php?var=base and then the second menu if you select something it turns the url into products.php?var=base&sId=3 , as you see i need those menus to filter products with 2 variables but unable to source or code it, any help anyone can give me will be most appreciative, thanks. Quote
steady11 Posted September 16, 2011 Author Posted September 16, 2011 its not really stealing someones work is it ... its basic html and java, its out there, everyones doing it, and im just using the menu system, which isnt really copyrighted by a company its html you nit, thanks for that link anyway but what im looking for is slightly different but similar to chain links. Quote
bluegman991 Posted September 16, 2011 Posted September 16, 2011 (edited) I wouldn't consdider this stealing either since the code to do this would be so simple and have seen similar things on many sites. Here is the code you are looking for to achieve what they are doing. I am going to only do the javascript part and hopefully you know enough php to incorporate what you are trying to do. <form method="get" action=""> <select onchange="submit();" name="color"> <option>red</option> <option>blue</option> <option>green</option> </select> <select onchange="submit();" name="size"> <option>small</option> <option>medium</option> <option>large</option> </select> </form> Code is tabbed for readability. This is not tested but i'm pretty sure it should work. In your onchange attribute if "submit();" doesn't work, then one of the following should. form.submit(); this.form.submit(); Edited September 16, 2011 by bluegman991 Quote
steady11 Posted September 17, 2011 Author Posted September 17, 2011 :) Great, thanks bluegman, just goes to show there are some useful people out there, and there are some idiots who try to act big behind the computer, truth of the matter is they have no life, not willign to help others and trying to make themselves sound good, it is standard html code as i said, and your pretty much saying if i was to view source a site and copy a bold tag off of it and put it on mine then thats stealing ... noob, get a life and get something better to do, some of us are here to learn and not come across aseholes like you. Thanks again bluegman :) Quote
steady11 Posted September 17, 2011 Author Posted September 17, 2011 exactly what i wanted. thanks alot mate Quote
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.