Difference between #4 and #5 of
Javascript and AJAX with Yii

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
[...]
23 0
30 followers
Viewed: 182 032 times
Version: 1.1
Category: How-tos
Written by: François Gannaz
Last updated by: François Gannaz
Created on: Sep 30, 2012
Last updated: 11 years ago
Update Article

Revisions

View all history