Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Script Help!!!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Script Help!!!

 Post Reply Post Reply
Author
felix.akinyemi View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: United States
Status: Offline
Points: 113
Post Options Post Options   Thanks (0) Thanks(0)   Quote felix.akinyemi Quote  Post ReplyReply Direct Link To This Post Topic: Script Help!!!
    Posted: 28 December 2004 at 10:46am

<html>
<head>
<title>Hit Counter</title>
</head>
<body bgcolor="white" text="black">
<%
'Dimension variables
Dim fsoObject        &nb sp;          'File System Object
Dim tsObject        &nbs p;         &nbs p; 'Text Stream Object
Dim filObject        &nb sp;         &nb sp;  'File Object
Dim lngVisitorNumber       &n bsp;  'Holds the visitor number
Dim intWriteDigitLoopCount  'Loop counter to display the graphical hit count

'Create a File System Object variable
Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")

'Initialise a File Object with the path and name of text file to open
Set filObject = fsoObject.GetFile(Server.MapPath("site_count.txt"))

'Open the visitor counter text file
Set tsObject = filObject.OpenAsTextStream
'Read in the visitor number from the visitor counter file
lngVisitorNumber = CLng(tsObject.ReadAll)

'Increment the visitor counter number by 1
'lngVisitorNumber = lngVisitorNumber + 1

'Create a new visitor counter text file over writing the previous one
Set tsObject = fsoObject.CreateTextFile(Server.MapPath("site_count.txt"))

'Write the new visitor number to the text file
tsObject.Write CStr(lngVisitorNumber)

'Reset server objects
Set fsoObject = Nothing
Set tsObject = Nothing
Set filObject = Nothing

'Display the hit count as text
'Response.Write(lngVisitorNumber)

    Response.Write("There has been ")

'Loop to display graphical digits
For intWriteDigitLoopCount = 1 to Len(lngVisitorNumber)
    'Display the graphical hit count
    Response.Write("<b>" & Mid(lngVisitorNumber, intWriteDigitLoopCount, 1) & "</b>")
Next

    Response.Write(" visitors.")
%>
</body>
</html>
 
It displays the numbers like 1000000
but i want it to display it like 100,000,000
 
I tried but its didn't work...
 
Can anyone help!!!
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2004 at 11:02am
try formatNumber(Value,2)

that should be ok.. it will then show it like the numbers below, in the footer of this page.
Back to Top
felix.akinyemi View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: United States
Status: Offline
Points: 113
Post Options Post Options   Thanks (0) Thanks(0)   Quote felix.akinyemi Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2004 at 11:47am
OK, sorry bout that... i got it, thanks 4da help!!!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.