Show progress bar in query page, hide progress bar after data load success

Source: Internet
Author: User
Data | show | page
<script language= "JavaScript" >function onsubmit ()  {  var waitingInfo  = document. getElementById (Getnetuitagname ("Waitinginfo"));  waitinginfo.style.display =  "";  // Show the progressbar  progress_update ();    //begin the  progressbar  //waiting for several seconds,you would delete in  Your case  for (i=0;i<1000000;i++) {   j=i+i;  }   Location.href= "progressbar.jsp";  //config your action page in here } / / build the netui_names table to map the tagid attributes //  to the real id written into the HTML if  (netui_names = = null)   var netui_names = new object ();  netui_names.selectbutton= " Portlet_15_1seLectbutton " // method which will return a real id for a  tagid function getnetuitagname (ID)  {  return netui_names[id]; }   method which will return a real id for a tagid, //  the tag parameter will be used to find the scopeid for  // containers that may scope their ids function getnetuitagname ( Id, tag)  {  var scopeid = getscopeid (tag);  if  (scopeId  ==  "")      return netui_names[id];  else      return netui_names[scopeId  +  "__"  + id]; } // method  which get a tag will find any scopeid that, // was  inserted by  The containers function getscopeid (tag)  {    if  (tag ==  null)        return  "";    if  ( Tag.getattribute)  {        if  (Tag.getattribute (' ScopeID ')  != null)           return tag.getattribute (' ScopeID ');    }     if  (tag.scopeid != null)         return tag.scopeid;    return getscopeid ( Tag.parentnode);  } // build the netui_names table to map the  tagId attributes // to the real id written into the  html if  (netui_names == null)     var netui_names = new  object ();  netui_names.waitinginfo= "Waitinginfo"  var progressend = 15;  // set to number  of progress <span> ' s. var progresscolor =  ' green ';  // set  to progress bar color var progressinterval = 200; // set  to time between updates  (milli-seconds)  var progressAt =  Progressend; var progresstimer; function progress_clear ()  {  for  (var  i = 1; i <= progressend; i++)     document. getElementById (' Progress ' +i) .style.backgroundcolor =  ' Transparent ';   progressat =  0; } function progress_update ()  {  progressAt++;  if  ( Progressat > progressend)  progress_clear ();   else document. getElementById (' Progress ' +progressat). style.backgroundcolor&nbSp;= progresscolor;  progresstimer = settimeout (' progress_update () ', progressInterval) ;  } function progress_stop ()  {  cleartimeout (Progresstimer);   progress _clear ()  }</script><span id= "Waitinginfo"  style= "Display:none" ><table  align= "center" ><tr><td> processing data,  Please wait ... <div style= "FONT-SIZE:2PT;PADDING:2PX; border:solid black 1px "><span id=" Progress1 ">   </span><span  id= "Progress2" >   </span><span id= "PROGRESS3" >   </ Span><span id= "Progress4" >   </span><span id= "PROGRESS5" >    </span><span id= "PROGRESS6" >   </span><span id= " PROGRESS7 ">   </span><span id=" Progress8 ">   </span> <span id= "Progress9">   </span><span id=" Progress10 ">   </span><span  id= "Progress11" >   </span><span id= "PROGRESS12" >    </span><span id= "Progress13" >   </span><span id= "PROGRESS14" >    </span><span id= "PROGRESS15" >   </span></div> </td></tr></table></span><center> Click the button to try: <input name= button " type=" Button " value=" Query " onclick=" Javascript: return onsubmit (); > </center>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.