Is there a way to write a javascript function that receives an element from database, does some work on this input, and save the result on another database element? Can you refer me to example for this?