开发者

How to create ajax-based custom field in IPB

开发者 https://www.devze.com 2023-04-11 14:52 出处:网络
I recently got an assignment to work with Invision Power Software. My job is to create several applications. The first one needs me to create three a开发者_C百科jax-based fields, where the content of

I recently got an assignment to work with Invision Power Software. My job is to create several applications. The first one needs me to create three a开发者_C百科jax-based fields, where the content of 2nd field depends on 1st, and 3rd on 3nd.

OK, it sounds complicated. How about this: I need Country / City / Province, where list of cities and provinces is dynamically loaded from database depending on previous fields.

How to create three custom dropdown fields where data for them is dynamically loaded (second field depends on first, third field depends on second)?


A general frame:

-You have 3 drop select menus A,B,C

-A is full with values, B and C are empty

-You start by putting an event on A to call a function let's call it builtDropDown()

-builtDropDown(value_selected) places appropriate values to B

-As for values going to B they could be retrieved by ajax or if they are very few the could have been preloaded and kept in a js array

-The same goes for C

This is non-ajax example you could start from: Js 3 different select menus dependend on previous selection

0

精彩评论

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