Gnub Posted March 6, 2007 Share Posted March 6, 2007 Im wondering if this is possible with PHP, but im leaning to believe that it is not. Question: I want to have 2 combo boxes on form, holding a list of dates. When i change Combobox 1(which will hold the beginning data), ComboBox 2 will update itself to the data held in Combobox 1, and will not be able to select dates held before the date held in combobox 1. Example: Combo 1 holds 05/03/2007 Combo 2 now holds 05/03/2007, but cannot select anything prior to 05/03/2007 Im thinking that it can only be done through JS. But if it is possible with PHP, i'd rather pursue that method. (i hate JS) If JS is the only way to go, do any of you know a user-friendly JS out there that full fills this task? Cheers in advance Gnub. Quote Link to comment https://forums.phpfreaks.com/topic/41477-possible-without-javascript/ Share on other sites More sharing options...
.josh Posted March 6, 2007 Share Posted March 6, 2007 yes you need js for that. sorry. Quote Link to comment https://forums.phpfreaks.com/topic/41477-possible-without-javascript/#findComment-200958 Share on other sites More sharing options...
nloding Posted March 6, 2007 Share Posted March 6, 2007 Well, you can do it with PHP, but it requires a page refresh and posting data to the server. That's not necessarily a bad thing. To do it without PHP does require javascript, and I don't know of any scripts that already do that. Looks like you're writing your own! Quote Link to comment https://forums.phpfreaks.com/topic/41477-possible-without-javascript/#findComment-200961 Share on other sites More sharing options...
.josh Posted March 6, 2007 Share Posted March 6, 2007 well, yes, it's possible to update dropdowns using only php, but he asked if it was possible to update it when he changes the value of checkbox #1. I'm am just going to assume (like all the 100's of other people who ask...) that he wants #2 to automatically update when he makes a new selection, before he actually does any kind of submitting or refreshing or anything. No, that's not possible (with only php). If the options are based on info in a database or something on the server, look into ajax. Quote Link to comment https://forums.phpfreaks.com/topic/41477-possible-without-javascript/#findComment-200963 Share on other sites More sharing options...
Gnub Posted March 6, 2007 Author Share Posted March 6, 2007 ok, thanks for the feedback! Quote Link to comment https://forums.phpfreaks.com/topic/41477-possible-without-javascript/#findComment-200968 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.