Print Page | Close Window

Script problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15515
Printed Date: 30 March 2026 at 5:05am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Script problem
Posted By: pilot99
Subject: Script problem
Date Posted: 19 June 2005 at 11:30pm
ok i am in the process of making my site and i have a asp hit counter. all the text around it is white but the number that is created by the hit counter is black i do not know how to make this font white can anyone help me?
 
The hit counter code
 
<%
on error resume next
' Create a server object
set fso = createobject("scripting.filesystemobject")
' Target the text file to be opened
set act = fso.opentextfile(server.mappath("asp_count.txt"))
' Read the value of the text document
' If the text document does not exist then the on error resume next
' will drop down to the next line
counter = clng(act.readline)
' Add one to the counter
counter = counter + 1
' Close the object
act.close
' Create a new text file on the server
Set act = fso.CreateTextFile(server.mappath("asp_count.txt"), true)
' Write the current counter value to the text document
act.WriteLine(counter)
' Close the object
act.Close
' Write the counter to the browser as text
Response.Write counter
%>
 
pilot99



Replies:
Posted By: pmormr
Date Posted: 20 June 2005 at 12:48am
the cool thing that you can use in asp is called "spaghetti code" (some people think it's annoying, but i find it quite nice)

if you have a piece of code that writes a line simply do this


<%
   'whatever code is before
   'close the asp brackets
%>
   <font color="#FFFFFF">
<%
   Response.write "this is the line that will be white"
%>
   </font>
<%
   'continue code
%>


also remember that asp outputs HTML. so you can also use response.write to do tags... the tricky thing is the quotes... notice how they're written so the response.write doesn't get screwed up


<%
   Response.Write "<font color=""#FFFFFF"">"
   Response.Write "whatever you want white"
   Response.Write "</font>"
%>


hope that's what you needed

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: ub3rl337ch3ch
Date Posted: 20 June 2005 at 1:03am
spaghetti code is great. Though it'd *technically* better if you used css styles instead of the font tag.


Posted By: pmormr
Date Posted: 20 June 2005 at 1:10am
I don't like CSS for some reason... probably because I haven't worked with it a bunch. I'm still changing individual values like 30 times when I'm web designing if I have to change a table color in my template or something

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: ub3rl337ch3ch
Date Posted: 20 June 2005 at 1:40am
i really don't use it all that much, but i work mostly with asp, recreating access front ends... because it gets so *&&^*^#*$& convoluted, i tend to avoid page-wide css, but i still prefer using styles in <p> tags than the font tag, simply because it's neater and quite a bit easier.


Posted By: pmormr
Date Posted: 20 June 2005 at 2:00am
the only reason I use font tags is because it's what Dreamweaver uses and that's pretty much how I learned HTML (looking at the code view whilst creating my pages)

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: ub3rl337ch3ch
Date Posted: 20 June 2005 at 2:01am
bah, i learn something when i need it. Tongue


Posted By: pilot99
Date Posted: 20 June 2005 at 10:37am
thank you so much i tryed it and it woerke di new about the font code i just didnt know it would workin asp. i dont like css that much eaither for the site im creating im actually using an asp document to controll all my table colors(thats what web wiz does).



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net