0

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 ajax-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)?

d4rky
  • 469
  • 6
  • 13

1 Answers1

1

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

Community
  • 1
  • 1
Melsi
  • 1,462
  • 1
  • 15
  • 21
  • I know how to do it in JS etc, the point of my question was "where do I put PHP code to have three dropdown menus in IPB and where to put the ajax-handling code. It doesn't matter though, I dropped this job as I have no clue what to do in IPB and both parties (me and client) didn't have time for me to learn. Thanks anyway :) – d4rky Oct 10 '11 at 16:58
  • 1
    We must always keep going and believe in our self. I wish you luck and hope you get an other project soon. Keep the hard work because there are so many new technologies today, cms, php-mvc, ORM etc etc and for each of them, for example php-mvc there are so many different packages (zeend,yii etc). You might have a degree, you might know so many things but in the end you realize that the fact you don't know about a specific software product will cause you not to get some job, sad but true. Keep coding! – Melsi Oct 10 '11 at 21:05