Monday, January 31, 2005
by Nik Kalyani
Monday, January 31, 2005 8:55:44 PM (Pacific Standard Time, UTC-08:00)

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:

<script language="Javascript">


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");
     }
}

</script>

<div align="center"><img id="<%= ClientID %>_ProgressBar" src="<%= TemplateSourceDirectory %>/images/progress.gif" style="display:block" /></div>

<iframe id="<%= ClientID %>_ResultsFrame" onLoad="toggleProgress('<%= ClientID %>_ProgressBar','<%= ClientID %>_ResultsFrame')" src="http://www.dotnetnuke.com" style="display:none"></iframe>

#    Comments [0] - Trackback    

RSS feed
Search and Links
Bling

View Nik Kalyani's profile on LinkedIn

Contact me: nik*kalyani.com (replace "*")

TechBubble
www.flickr.com
This is a Flickr badge showing public photos from techbubble. Make your own badge here.
Statistics
Total Posts: 216
This Year: 34
This Month: 2
This Week: 0
Comments: 238
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Nik Kalyani
Sign In
All Content © 2008, Nik Kalyani