I have inherited a php app with the yii framework. The syntax is foreign to me. I need the submit/register button to pop a disclaimer. So, I'm trying to do something like this...
echo '<div class="row buttons">';
echo CHtml::submitButton('Create Now',array('onClick'="return confirm('You agree to the term to register.\n\nPress OK to continue.')"));
echo '</div>';
Anyone have a suggestion, this isn't working???
Page 1 of 1
CHtml::submitButton with onClick How to add an onClick confirm
#2
Posted 03 July 2012 - 04:35 PM
After playing with it for awhile I came up with...
echo '<div class="row buttons">';
echo CHtml: ubmitButton('Save', array('confirm'=>'You agree to the term to register.\n\nPress OK to continue.'));
echo '</div>';
It works, but it comes up twice like the post from #135921
echo '<div class="row buttons">';
echo CHtml: ubmitButton('Save', array('confirm'=>'You agree to the term to register.\n\nPress OK to continue.'));
echo '</div>';
It works, but it comes up twice like the post from #135921
Share this topic:
Page 1 of 1

Help












