ajax helper -- dynamically dropdown list


/ Published in: HTML
Save to your folder(s)

reference for create own ajax helper in CakePHP


Copy this code and paste it in your HTML
  1. <form method="get" id="f">
  2. <tr>
  3. <td>Country:</td>
  4. <td><select name="country" id="country"></select></td>
  5. </tr>
  6. <tr>
  7. <td>State/Region:</td>
  8. <td><select name="region" id="region"></select></td>
  9. </tr>
  10. <tr>
  11. <td>City:</td>
  12. <td><select name="city" id="city"></select></td>
  13. </tr>
  14. </table>
  15. </form>
  16.  
  17. <?= $ajax->attachWidgets(array('country' => 'country',
  18. 'region' => 'region',
  19. 'city' => 'city')) ?>
  20.  
  21. <?= $ajax->loadJsApp(true) ?>

URL: http://ajax.zervaas.com.au/examples/CountryRegionCityJax/index.phps

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.