Pass IP address into template node

Hi,
To view video from uv4l on RPi, I have the following working code inside the template node:

<iframe id="VFrame" width="640" height="480" frameborder="0" src = "http://192.168.1.8:8080/stream"></iframe> 

Now I want to pass the IP address from the hostIP node into the template node. The following code doesn't work. Need some help to make it work.

<iframe id="VFrame" width="640" height="480" frameborder="0" src = ""></iframe>

<script id="VScript" type="text/javascript">
$('#VFrame').src = "http://"+ msg.payload +"/stream";
</script>

Please don't duplicate threads.

sorry, I didn't see it