Counter

Results 1 to 3 of 3

Thread: Counter

  1. #1
    Join Date
    Dec 1969
    Posts
    5

    Default Counter

    I am Un able to make a counter<BR><BR>My Global.asa is not executing<BR><BR>thanks

  2. #2
    beyond Guest

    Default reference......

    you can include the blow script in your first page.<BR><BR>count.asp<BR>&#060;%@ LANGUAGE = VBScript %&#062;<BR>&#060;%option explicit %&#062;<BR>&#060;% response.buffer=true %&#062;<BR>&#060;%<BR><BR>dim fs,a,ct<BR>Session.Timeout=1<BR>Set fs = CreateObject("Scripting.FileSystemObject")<BR>Set a = fs.OpenTextFile(Server.Mappath("count.txt"))<BR>ct = Clng(a.ReadLine)<BR>if Session("ct") = "" then<BR> Session("ct") = ct<BR> ct = ct + 1<BR> a.close<BR> Set a = fs.CreateTextFile(Server.Mappath("count.txt"), True)<BR> a.WriteLine(ct)<BR>end if <BR>a.Close<BR>%&#062;<BR>&#060;%<BR>dim length,i,imgPath<BR>imgPath=""<BR>Length = Len(ct) <BR>i=1<BR>Do While i &#060;= Length <BR>imgPath= imgPath & "&#060;img src = \""img/number/" & Mid(ct,i,1) & ".gif\""&#062;" <BR>i=i+1<BR>Loop <BR><BR>Response.ContentType = "application/x-javascript"<BR>&#039Response.Write "&#060;Script language= ""javascript""&#062;"<BR>Response.Write "document.write("" " & imgPath & " "") "<BR>&#039Response.Write "&#060;/script&#062;"<BR>%&#062;<BR><BR>

  3. #3
    beyond Guest

    Default reference......

    you can include the blow script in your first page.<BR><BR>count.asp<BR>&#060;%@ LANGUAGE = VBScript %&#062;<BR>&#060;%option explicit %&#062;<BR>&#060;% response.buffer=true %&#062;<BR>&#060;%<BR><BR>dim fs,a,ct<BR>Session.Timeout=1<BR>Set fs = CreateObject("Scripting.FileSystemObject")<BR>Set a = fs.OpenTextFile(Server.Mappath("count.txt"))<BR>ct = Clng(a.ReadLine)<BR>if Session("ct") = "" then<BR> Session("ct") = ct<BR> ct = ct + 1<BR> a.close<BR> Set a = fs.CreateTextFile(Server.Mappath("count.txt"), True)<BR> a.WriteLine(ct)<BR>end if <BR>a.Close<BR>%&#062;<BR>&#060;%<BR>dim length,i,imgPath<BR>imgPath=""<BR>Length = Len(ct) <BR>i=1<BR>Do While i &#060;= Length <BR>imgPath= imgPath & "&#060;img src = \""img/number/" & Mid(ct,i,1) & ".gif\""&#062;" <BR>i=i+1<BR>Loop <BR><BR>Response.ContentType = "application/x-javascript"<BR>&#039Response.Write "&#060;Script language= ""javascript""&#062;"<BR>Response.Write "document.write("" " & imgPath & " "") "<BR>&#039Response.Write "&#060;/script&#062;"<BR>%&#062;<BR><BR>

Posting Permissions

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