Percentage of Records Loaded

Results 1 to 2 of 2

Thread: Percentage of Records Loaded

  1. #1
    Jeff Kovach Guest

    Default Percentage of Records Loaded

    Hello,<BR><BR>What I&#039;m Trying to Do:<BR>To have the browser Status Bar display the percentage of records left to load. I&#039;m using an Alert Message at first to see progress.<BR><BR>Problem:<BR>My code below displays the percentage with 13 or 14 decimal places after the percentage. I want to get rid of the decimal palces. Or, better yet, if you know an easier way to code it, that would be great!<BR><BR>Sample Code:<BR><BR>...<BR><BR>&#060;%<BR>Dim RecCnt<BR>Dim CurRec<BR>Dim RecNum<BR>Dim RecNumTotal<BR>Dim CurRecNum<BR><BR>RecCnt = 0<BR>CurRec = 0<BR>RecNum = 0<BR> <BR>RecNumTotal = rs.RecordCount <BR>RecNum = rs.RecordCount%&#062;<BR> <BR>&#060;%Do While Not Jobs.EOF<BR> CurRecNum = RecNumTotal - RecNum%&#062;<BR> <BR> &#060;SCRIPT LANGUAGE=JAVASCRIPT&#062;<BR> window.alert (&#060;%=((CurRecNum*100)/RecNumTotal)%&#062; + "% Records Loaded")<BR> //window.status = &#060;%=((CurRecNum*100)/RecNumTotal)%&#062; + "% Records Loaded"<BR> &#060;/SCRIPT&#062;<BR><BR>...<BR><BR>Thanks,<BR>Jeff

  2. #2
    Join Date
    Dec 1969

    Default RE: Percentage of Records Loaded

    to get rid of decimal places use parseInt() or Math.round()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts