how to use onclick ()

Helo i’m a new member in this forum

I study a site that uses Yii framework

the proble that I want to display a pop up when I click on a button ( Versement de ma cagnotte )

I put the code

echo CHtml::submitButton('Versement de ma cagnotte',array('name'=>'demandeVersement'));

Help please


Use CJuiDialog.

Welcome to this forum, chedi!

If you really want to display pop up, you can try:

echo CHtml::button('Versement de ma cagnotte', array(


	'onclick'=>'Call your pop up display procedure from here ...'


Hope this can help you.

example that open a new window like a popup :

echo CHtml::button('Versement de ma cagnotte', array(


        'onclick'=>" ('fenetre_popup.html', 'nom_interne_de_la_fenetre', config='height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')"


Maybe you better use the jQuery click event. You can insert jQuery code in pages using Yii::app()->clientScript->registerScript()