Web Wiz - Green Windows Web Hosting

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

Script problem

 Post Reply Post Reply
Author
pilot99 View Drop Down
Groupie
Groupie


Joined: 05 July 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote pilot99 Quote  Post ReplyReply Direct Link To This Post Topic: Script problem
    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
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post Posted: 20 June 2005 at 2:01am
bah, i learn something when i need it. Tongue
Back to Top
pilot99 View Drop Down
Groupie
Groupie


Joined: 05 July 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote pilot99 Quote  Post ReplyReply Direct Link To This Post 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).

Edited by pilot99 - 20 June 2005 at 10:39am
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.