开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜