Battery gauge load msg.payload into javascript [Resolved]

Never mind that will not work. This more complicated than my skills can comprehend. I guess javascript behaves differently in the template, like you said.

If i understand correctly i cannot pass msg.payload directly to javascript, I can only pass it to an html object? Like an input field?