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    

Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, i, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
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: 204
This Year: 22
This Month: 0
This Week: 0
Comments: 231
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