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?? Link to comment https://forums.phpfreaks.com/topic/24023-dependant-list-boxes/ 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. Link to comment https://forums.phpfreaks.com/topic/24023-dependant-list-boxes/#findComment-109151 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. Link to comment https://forums.phpfreaks.com/topic/24023-dependant-list-boxes/#findComment-109154 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) Link to comment https://forums.phpfreaks.com/topic/24023-dependant-list-boxes/#findComment-109155 Share on other sites More sharing options...
Solarpitch Posted October 15, 2006 Author Share Posted October 15, 2006 Thanks . . thats brilliant!! :) Link to comment https://forums.phpfreaks.com/topic/24023-dependant-list-boxes/#findComment-109159 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? Link to comment https://forums.phpfreaks.com/topic/24023-dependant-list-boxes/#findComment-109161 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.