Displaying a wait indicator while IFRAME loads
There was a question in the DNN forums today about how to display a wait indicator while an IFrame was loading its contents. My solution:
function toggleProgress(progressId, iframeId)
{
objProgress = document.getElementById(progressId);
objIframe = document.getElementById(iframeId);
if ((objProgress) && (objIframe))
{
objProgress.style.display = (objProgress.style.display == "none" ? "block" : "none");
objIframe.style.display = (objIframe.style.display == "none" ? "block" : "none");
}
}
_ResultsFrame” onLoad=”toggleProgress(‘<%= ClientID %>_ProgressBar’,’<%= ClientID %>_ResultsFrame’)” src=”http://www.dotnetnuke.com” style=”display:none”>
Leave a comment