I have some problems with php and Prototype.I am trying to implement listbox population (second dropdown box values depend on first dropdown) using php,Mysql and Prototype.But i have no idea how to implement . I hope you all have sucessfully done this, please show me an example --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I tried a google search for "select populate prototype php" And found these two links. I hope it helps you. http://borkweb.com/story/remote-javascripting-example-part-i http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax/ ANIL T CHERIAN wrote:> I have some problems with php and Prototype.I am trying to implement > listbox population (second dropdown box values depend on first > dropdown) using php,Mysql and Prototype.But i have no idea how to > implement . I hope you all have sucessfully done this, please show me > an example--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ANIL T CHERIAN
2007-Jul-06 16:35 UTC
Re: list box poupulation using php,mysql and ptototype
how can we do this without using cakephp please help me On Jul 5, 12:37 pm, Sam Figueroa <unimatrixZx...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I tried a google search for "select populate prototype php" > > And found these two links. I hope it helps you. > > http://borkweb.com/story/remote-javascripting-example-part-i > > http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-usi... > > ANIL T CHERIAN wrote: > > I have some problems with php and Prototype.I am trying to implement > > listbox population (second dropdown box values depend on first > > dropdown) using php,Mysql and Prototype.But i have no idea how to > > implement . I hope you all have sucessfully done this, please show me > > an example--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
There are a many ways you could accomplish this. It''s a common request, so Google might be your friend here. In fact, this query: http://www.google.com/search?q=prototype+select+boxes Returned this helpful example as the second response: http://maraz.org/2007/05/23/prototype-scriptaculous-chained-select/ One of the questions you may wish to ask: how complex is your second list? Is it feasible to cache all possibilities locally when the page is first loaded, or do you really need to Ajax on every change? Here''s one way (similar to the example above). The code is simple, employs no caching whatsoever, and hasn''t been tested in any way. It should be enough to get you started. Event.observe( ''idOfSelect'', change'', function (e) { var sel = $(''idOfSelect''); Ajax.Update(''idOf2ndSelect'', url, { method: ''get'', parameters: {sel1: sel.value} } }); Have the code at ''url'' return the desired <option> tags. TAG On Jul 6, 2007, at 10:35 AM, ANIL T CHERIAN wrote:> > how can we do this without using cakephp > > please help me > > On Jul 5, 12:37 pm, Sam Figueroa <unimatrixZx...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: >> I tried a google search for "select populate prototype php" >> >> And found these two links. I hope it helps you. >> >> http://borkweb.com/story/remote-javascripting-example-part-i >> >> http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box- >> usi... >> >> ANIL T CHERIAN wrote: >>> I have some problems with php and Prototype.I am trying to implement >>> listbox population (second dropdown box values depend on first >>> dropdown) using php,Mysql and Prototype.But i have no idea how to >>> implement . I hope you all have sucessfully done this, please >>> show me >>> an example > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---