Targeting events


I am trying to build an db switching application. Is there a way to tie a specific event to a certain component, say a button?

Reason for this is that i got a drop down box with connection values. When the user selects this value and hits the button, i want an event to trigger and switch DB.

Any suggestions?

Yii is not even driven.

You can create an action for answer to the request triggered by the change of the dropDown.

I tried that, setting in "onClick" as an html option, but that is JS from what figred and i couldnt really get it to execute any php functions =/ (I am a novice programmer)

Let’s say like that:

All time you request a page, for example site/index, yii execute a function in the file SiteController, a function named actionIndex.

Read this page of the guide about it.

You should implement an action for "trigger something on buttons", even if is not the Yii philospy to trigger anithing, because is not event driven.

Read all the definitive guide for understand how it works. Developing a web based program is more difficoult than developing a standard one, because you have not button that triggers event but button that request pages.