Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Get Both Id And Description From Single-Line Dropdownlist

$
0
0
Hi

I have a 'single line' dropdownlist wich obtains its $data (id and description) from my db.

The dropdownlist is 'independent' and thus does not store the selected id in a model.

I use ajax to send the selected id (obtained with 'js:this.value') to my controller.

My question is:
How can I also send the description to my controller.
Currently, in the controller, I have to use the received id to read the database again - just to get the description. But it should be possible to send both the id and description to the controller at the same time.

Viewing all articles
Browse latest Browse all 18717

Trending Articles