update js with var to hold value