Device Resource Management System-progress bar
Use of progress bars:
1. You can use the progress bar during upload and download.
2. You can use the progress bar during File Import and export.
3. You can use a progress bar for operations on large volumes of data.
4. You can use the progress bar for remote data operations.
Steps:
1. Add a progress bar to the agent
2. Code
<Table id = "LOAD" width = "700" border = "0" align = "center" bgcolor = "# fafafa" cellpadding = "0" cellspacing = "0" bordercolor = "& quot; #000000 & quot; style = & quot; border-collapse: collapse; display: none ">
<Tr>
<TD> <br>
<Table width = "100%" border = "1" cellspacing = "0" cellpadding = "0" bordercolor = "# 287bce" style = "border-collapse: collapse">
<Tr bgcolor = "# f7f7f6">
<TD width = "20%" Height = "100" valign = "Middle">
<Table align = 'center' width = '2013'>
<Tr>
<TD colspan = '2' align = 'center'> <font size = "2">
Saving...
</Font>
</TD>
</Tr>
<Tr>
<TD id = 'tdone' Height = '25' width = 1 bgcolor = "blue"> & nbsp; </TD>
<TD id = 'tdtwo' Height = '25' width = 400 bgcolor = '# 000000'> & nbsp; </TD>
</Tr>
</Table>
</TD>
</Tr>
</Table>
</TD>
</Tr>
</Table>
Put it in the form1 of actingindex. jsp.
3. Copy js to actingindex. jsp:
VaR speed = 1;
VaR Len = 500;
VaR add = 0;
Function opencontenframe (){
VaR TD1 = Document. getelementbyid ('tdone ');
VaR td2 = Document. getelementbyid ('tdtwo ');
Add = add + 10;
Td1.width = add;
If (LEN-add <= 0 ){
Td2.width = 1;
} Else {
Td2.width = len-add;
}
If (add <= Len ){;
} Else {
Td1.width = 1;
Td2.width = 500;
Add = 0;
}
SetTimeout ('opencontenframe () ', 100 );
}
Function loading (){
Document. getelementbyid ("LOAD"). style. Display = "";
Document. getelementbyid ("opperate"). style. Display = "NONE ";
Opencontenframe ();
}
4. Add and execute the loading () operation in the SAVE js method.
5. Modify the ID of the existing table attribute on the page and Set ID = "operate1" and ID = "operate2"
6. Modify the loading () method
Function loading (){
Document. getelementbyid ("LOAD"). style. Display = "";
Document. getelementbyid ("operate1"). style. Display = "NONE ";
Document. getelementbyid ("operate2"). style. Display = "NONE ";
Opencontenframe ();
}