开发者

two independent dropdowns with xml binded data - cakephp - best method?

开发者 https://www.devze.com 2022-12-30 14:28 出处:网络
What\'s best method within cakephp site for- two dropdowns开发者_JAVA百科 one listing cds, one listing artists

What's best method within cakephp site for-

  • two dropdowns开发者_JAVA百科
  • one listing cds, one listing artists
  • on select of either cd or artist I need my additional text to appear below dropdowns

I have been searching through tutorials and manual - with no success. I am looking to learn by basic example - from form/view and controller.

latest try was something along this example to get dropdown [Dropdown select list in CakePHP


Although CakePHP techniques apply, the way that I'd do this in CakePHP is the same way I'd do it in any app. I'd use Javascript (the jQuery framework in my case) to:

  1. Bind an event handler to the change event of each dropdown
  2. Make an Ajax call to a URI that returns the "additional text" to be displayed below the dropdown
  3. Display said text

In the CakePHP context, I'd create methods in my CdsController and ArtistsController (I'm guessing at your naming convention, of course) to respond to the Ajax request.

0

精彩评论

暂无评论...
验证码 换一张
取 消