Update JavaScript Variables