POpup dialog for referencing ID

dear all,

i have tried to search before i made a decision to create this new thread.

i would like to make a popup dialog which shows a list of selectable values.

when an item selected, the popup fades out and returns the selected value to the main form.

for example:

assume i have two tables as follow:

table_a(id, a) and

table_b(id, id_a, B) -> id_a refers to table_a.id

then, i have a create form for table_b. of course there would be a field for the ‘id_a’ attribute.

to ease user input, i want to create a link next to the field which will show a popup window which contains a list of available records to be selected. when user selects one of those records listed, the popup fades out and returns the selected record’s id back to the main create form.

and if possible, the popup should work like a gridview which able to do such a simple search function.

can somebody suggest me how to do this,.?

thank you in advance,. :)

Have a look at CJuiDialog and its jQuery modal form implementation here.

thank you very much for your reply,. :)

is there any more clear direct example,.?

regards,. :)

There won’t be direct example for every day to day problems, but following algo should help.

  1. While generating form, at end generate dialog using CJuiDialog.

  2. On particular event, like selection of an option from select box, load dialog with a page (ajax) and open the dialog.

  3. Once user takes action on the dialog form / page / view, close the dialog and update necessary fields.

Alternate to this, if 2 select box can work, then you can try dependent drop down solution or jquery chain plugin to implement it.

thank you very much for the algorithm, will try it,.

my problem is to use the jQuery and the CJuiDialog itself,…

however, i will try it first,.

thank you once again :)

if anyone lese have some suggestion, please,.