Solarpitch Posted October 15, 2006 Share Posted October 15, 2006 Hi again guys,I was wondering if there's any way of coding dependant list boxes in PHP? What I mean buy that is the values of one list box(child) is chaged depending on the values of another(parent)?So I have 2 list boxes...Example:1. Make2. ModelMake contains: Taylormade Ping NikeSo if Ping is chosen in the first box I want the Model box to populate with Ping models:G5RaptureG2etc...Or if Taylormade is chosen I want the Model box to populate with Taylormade models:R7 QuadR5 Seriesetc...Any ideas?? Quote Link to comment Share on other sites More sharing options...
Tandem Posted October 15, 2006 Share Posted October 15, 2006 If you mean that you want it to happen instantly, and both boxes be on the same page, i think that's a javascript thing.If they are to appear on consecutive pages, then php can be used. Quote Link to comment Share on other sites More sharing options...
Solarpitch Posted October 15, 2006 Author Share Posted October 15, 2006 Yeah I want it to appear on the same page. So the instant one is changed, so is the value of the other!Is it definatly javascript? Does anyone know a way this can be done?www.carzone.ie have a good example. You select the type of car and it fills the next box with the models of that car. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 15, 2006 Share Posted October 15, 2006 Take a look at the baaSelect link in my sig (javascript solution).Another opton is AJAX (see other link) Quote Link to comment Share on other sites More sharing options...
Solarpitch Posted October 15, 2006 Author Share Posted October 15, 2006 Thanks . . thats brilliant!! :) Quote Link to comment Share on other sites More sharing options...
knowram Posted October 15, 2006 Share Posted October 15, 2006 It looks like I am trying to do a similar thing. If you don’t mind me asking what ended up working for you? 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.