Hi there,
On my main view (myBookings) I’ve got this ajaxLink, it opens a CJuiDialog:
$target = CHtml::normalizeUrl(array('clientManageBookings/showChangeEndDateDialog'));
echo CHtml::ajaxLink(Yii::t('texts', 'BUTTON_CHANGE_END_DATE'), $target,
array(//ajaxOptions
'type' => 'POST',
'update' => '#dialog',
'data' => array('bookingId' => $booking->id),
),
array(//htmlOptions
'href' => $target,
'class' => 'rc-linkbutton-small',
'id' => 'endDateLink' . uniqid(),
)
);
Once I click OK in the CJuiDialog I want to refresh the main view (myBookings). So I’ve got this in the CJuiDialog OK button (ajaxSubmitButton).
'success' => 'function(data) {
window.location.href="' . CHtml::normalizeUrl(array('myBookings')) . '";
}
So the 1st code snippet above is re-executed but this time the CHtml::ajaxLink() call does not work. The error message is:
range() [<a href='function.range'>function.range</a>]: step exceeds the specified range
C:\xampp\htdocs\yii\framework\web\helpers\CJavaScript.php(90)
It looks like something is wrong with the Javascript. Any idea ?
Cheers
Renaud