calling js functions from cc