开发者

Add <options> dynamically to HTML <select> tag in Jquery UI dialog widget

开发者 https://www.devze.com 2023-04-02 18:21 出处:网络
I require to add options dynamically to drop down menu in a jquery ui dialog. My code is in php so i\'ll have to pass the variables to javascript function for jq开发者_StackOverflow中文版uery and use

I require to add options dynamically to drop down menu in a jquery ui dialog. My code is in php so i'll have to pass the variables to javascript function for jq开发者_StackOverflow中文版uery and use these values to make the drop down list. How do I do that?


  1. Send the options out of PHP as an array or JSON decoded data
  2. In Javascript when you create a dialog box you can run a function on dialog open. Use this as an opportunity to populate options.
  3. Select the /select box/ element and append select box with options.

If need help visit this post

0

精彩评论

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