Put back missing setValue function

- Put back setValue function removed in a js refactor.

- I originally made this to master than noticed in contribution that develop was your desired place. However, develop seems pretty out of wack with master right now. So I'm putting this back to master. 

I've simple put back code that was removed. If there is a better/preffered method please let me know.