javascript - how to use the spinning.gif image on a web application -


i have canvas html5 web app:-

i trying add 'spinning.gif' image while canvas loaded via sql queries.

<div id="somehiddendiv" style="display:none;"><img src="/../spinner.gif"/>... please wait, browser working ...</div> 

so far, have thought of script produce idea.

however, has few problems.

1) image not totally visible, since top part of page panel (text box, buttons) , rest of canvas 800 950 (which scrollable side side). 2) image not centered. 3) letters not visible, because the panel's height short enough show first 4 circles of spinning.gif image.

what ideally like:-

panel-1 has textbox. once user inputs information in textbox , presses submit button, whole page should go background , spinning.gif image should come foreground. once query complete(ajax) canvas painted, spinning.gif image goes away , page intractable.

here beginning of page:-

<asp:content id="bodycontent" runat="server" contentplaceholderid="maincontent">     <span class="style1"><strong>&nbsp;<asp:panel id="panel1" runat="server" backcolor="#999966"         borderstyle="double" height="129px" style="margin-top: 0px" width="913px">         &nbsp; <span class="style2">&nbsp;enter member id: </span>         <br />         &nbsp;&nbsp;<asp:textbox id="textbox3" runat="server" backcolor="silver"              bordercolor="silver" height="20px" style="margin-left: 6px" width="136px"></asp:textbox>         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;         <asp:button id="button6" runat="server" backcolor="silver" font-bold="true"              height="28px" onclientclick="store_memid(); return false;"              style="margin-left: 20px" text="submit" width="78px" />         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<asp:textbox id="textbox4" runat="server" backcolor="#99ff99"              bordercolor="gray" borderstyle="double" borderwidth="2px"              font-names="arial unicode ms" font-size="smaller" forecolor="black"              height="77px" ontextchanged="textbox4_textchanged" readonly="true" rows="3"              style="margin-left: 0px; margin-top: 0px;" textmode="multiline" width="193px"></asp:textbox>         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;         <asp:button id="button7" runat="server" backcolor="silver" borderstyle="groove" text="&lt;&lt;&lt; past"             width="69px" height="23px" style="margin-top: 0px" />         <asp:button id="button8" runat="server" backcolor="silver" borderstyle="groove"             style="margin-left: 28px" text="future &gt;&gt;&gt;" width="78px"              height="23px" />         &nbsp;&nbsp;&nbsp;&nbsp;         <asp:button id="button9" runat="server" backcolor="silver" text="today" width="63px"             font-bold="true" height="23px" onclick="button9_click" />                     <%--       <asp:updateprogress id="pnlwait" associatedupdatepanelid="panel1" runat="server">                         <progresstemplate>                            <div style="padding: 0px; margin: 0px; width: 100%; text-align: center;">                         <img src="/../spinner.gif" alt="please wait..." style="padding: 0px;                             margin: 0px" />                         <span style="font-size: small; color: #8969a5;">finding search. please                             wait...</span>                            </div></progresstemplate></asp:updateprogress>--%> <%--        <p align="center"><asp:image id="imagestatus" imageurl="/../spinner.gif" runat="server" />        <h1><asp:label id="lblstatus" runat="server" text="loading please wait..."></asp:label></h1></p>         --%>  <div id="somehiddendiv" style="display:none;"><img src="/../spinner.gif"/>... please wait, browser working ...</div>      </asp:panel>         <br />     </strong></span>          <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.0.min.js"></script>          <canvas id="mycanvas" width="915" height="850" style="border: 2px double #000000;"></canvas>     <canvas id="balloon" width=105 height=105></canvas>      <script type="text/javascript"> 

i've had great luck using spin.js these kinds of spinners: http://fgnass.github.io/spin.js/

it's great library, uses css falls on older browsers.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -