Revision #5 has been created by bennouna on Oct 11, 2012, 5:20:44 PM with the memo:
Really minor correction: missing opening quotes in two "$cs->registerScript(…)" calls
« previous (#4) next (#6) »
Changes
Title
unchanged
Javascript and AJAX with Yii
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
javascript, AJAX
Content
changed
[...]
Aside [CJavascript::encode()], the method [CJavascript::quote()] can also be useful.
~
```php
$url = $this->createUrl('app/ajaxProcessor');
$cs->registerScript('var1', "var myUrl = '" . $url . "';"); // can break with some URLs
$cs->registerScript(
'var1', "var myUrl = '" . CJavascript::quote($url, true) . "';");
```~
### 3. Final words[...]