Display Div While Loading

. 5/26/10
  • Agregar a Technorati
  • Agregar a Del.icio.us
  • Agregar a DiggIt!
  • Agregar a Yahoo!
  • Agregar a Google
  • Agregar a Meneame
  • Agregar a Furl
  • Agregar a Reddit
  • Agregar a Magnolia
  • Agregar a Blinklist
  • Agregar a Blogmarks

HTML


<div id="showalertdiv" style="color:green;display:none;height:50%">
<h3>Please do you progress message here...</h3><br>
<input type="button" value="Close Div" onClick="closealertdiv()" style="margin-left:40%;margin-top:2%"/>
</div>

<div id="showcontentdiv">
<b>Display Full Screen Div</b><br><br>
<input type="button" value="Display Div" onClick="displaydiv()"/>
</div>


JavaScript


function displaydiv(){
            //alert("Test");
            document.getElementById("showalertdiv").style.display = "";
            document.getElementById("showcontentdiv").style.display = "none";
        }
        function closealertdiv(){
            //alert("Close Test");
            document.getElementById("showalertdiv").style.display = "none";
            document.getElementById("showcontentdiv").style.display = "";
        }



Example



Click Here
to DEMO

0 comments: