problem using registerScript


I’m using Yii::app()->clientScript->registerScript to trigger some javascript-code after loading the page is finish.

An typical line looks like this:


…which works fine.

In some cases I have to send an HTML ID to the function i trigger, like this:


…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.