helper function to show Javascript value on html