views:

31

answers:

1

Hello all,

Let's imagine an autocomplete widget scenario that grabs it's data from a database.

Let's assume that we have to:

  1. Grab the contents from DB1 to be displayed once the user clicks the input field. Then, After the user makes it's choice, we need to:

  2. Query the database DB1 for additional data concerning that selection made by the user.

  3. Using that data to query another system WEBSERVICE1 and retrieve a response with more data.

  4. Finally, display that returned data into input boxes so that we can work with them.

I'm describing this, so that you can realize that it's not a question of having one server side function, but several that are connected with other files etc... If this counts anything.

My try to describe the process:

Description A)

We need to, at some javascript event, call a php script. Process some stuff, and return back the results to be displayed.

I'm under a mvc "sort of" pattern but my controller isn't able to decide which views will be displayed. Instead, is the view that calls the controller method that she needs. Knowing this:

Can anyone, be kind enough to draw a skeleton or fill the blanks (that are A LOT I realize that and I'm sorry) on Description A above?

:s

Lost, Márcio

A: 

I'm not sure exactly what you are looking for, but have to tried using a jqueryUI autocomplete box?

http://jqueryui.com/demos/autocomplete/

Zack S.