I have a button which when clicked the first time displays an iframe. The source of the iframe is a text log file.
I would like that whenever the same button is clicked/toggled, the iframe would be refreshed too in case the log file is updated.
Here is my code so far:
HTML
<button id="displaylog">Display Log</button>
<iframe id="ramka" src="@Url.Action("OpenFile", "File")" style="display:none"></iframe>
jQuery
$(document).ready(function () {
$("#displaylog").click(function () {
$("#ramka").show();
});
});
document.getElementById(FrameID).contentDocument.location.reload(true);to reload your iframe