Difference between #4 and #5 of
Send asset folder path to a javascript of a widget

Changes

Title unchanged

Send asset folder path to a javascript of a widget

Category unchanged

Tips

Yii version unchanged

Tags unchanged

widgets, javasctipt, tutorial, assets, hack

Content changed

[...]
```

Now, in your script1.js, you can use the variable assetUrl. For example, if you do alert(assetUrl); you'll see the path of this assets, ıe. '/assets/234hn43/'.

##Important
To do this in more widgets or extensions, use unique javascript var name like
<[extensionName>]AssetUrl.
4 0
9 followers
Viewed: 34 758 times
Version: 1.1
Category: Tips
Written by: sensorario
Last updated by: sensorario
Created on: Sep 21, 2011
Last updated: 13 years ago
Update Article

Revisions

View all history