In this tutorial we will learn how to realize a create interface using a dialog.
In this tutorial we will learn how to realize a create interface using a dialog.
Often happens to have the need of change a part of the page with ajax.
Hello ppl. Even though i have a small experience with yii I though of writing this to help people which want to do something similar.
This example uses a MySQL DB with a table named tree
with the fields id
, name
, and parent_id
. The parent_id
will be NULL
for root elements. The SQL is kept simple (no autoinc, no FK, etc).
The easiest way to update content in AJAX is to use the renderPartial method.
"By Example" cookbook pages will provide coding examples for many of the commonly used classes within Yii. We will try to provide as many usage examples as possible for keep these pages as helpful as possible.
With yii you're able to create ajax requests and updates easily. But most times you always want to show a loading indicatior to your user.
Often you'll need a form with two dropdowns, and one dropdown's values will be dependent on the value of the other dropdown. Using Yii's built-in AJAX functionality you can create such a dropdown.