How to Auto Calculate Price in Javascript