Update view.js

there is a bug in 'on' function in YUI so using 'set' function