Hi,
I’m using Yii::app()->clientScript->registerScript to trigger some javascript-code after loading the page is finish.
An typical line looks like this:
Yii::app()->clientScript->registerScript("initStartMove","startMove();",CClientScript::POS_READY);
…which works fine.
In some cases I have to send an HTML ID to the function i trigger, like this:
Yii::app()->clientScript->registerScript("initStartMove","startMove('#myDivId');",CClientScript::POS_READY);
…but this broks my javascript code.
The error is “a.datepicker is undefined” which has nothing todo with this topic. Is there a typo, on my code, which I can’t see? Or is there a bug in registerScript while parsing the sting ?
For debuging the content of startMove() is:
function startMove(parent)
{return true;}
Thank you.