How to refresh an IFrame using Javascript?

iframe, javascript

Solution

var iframe = document.getElementById('youriframe');
iframe.src = iframe.src;

Problem

I have a webpage with an IFrame and a Button, once the button is pressed I need the IFrame to be refreshed. Is this possible, if so how? I searched and could not find any answers.

Original source

Related problems