RF-12860: added javascript according to comments from David Lee