?
Solved

changing font color using response.write

Posted on 2006-04-10
6
Medium Priority
?
329 Views
Last Modified: 2013-12-03
the default font color of my asp page is "white" as set in the body tag

i want to change my table headers to "gold" and only the table headers and the rest of the text on the page to remain white.

I have come up with this but it will not change the color:

        Response.write "<font color=""" & gold & """>"
      Response.write "<center>"
      Response.write "<TABLE BORDER=1>"
      Response.write "<TR>"
      Response.write "<TH>User_name</TH>"
      Response.write "<TH>Last_log_date</TH>"
      Response.write "<TH>IP_Address</TH>"
      Response.write "<TH>Login_count</TH>"
      Response.write "</TR>"
        Response.write "</font>"

can someone help me please?
0
Comment
Question by:sh00tar
  • 3
  • 2
6 Comments
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 16423859
Hello sh00tar,

try this

<TABLE BORDER=1>
  <thead>
    <TR style="COLOR: <%=gold%>">
      <TH>User_name</TH>
      <TH>Last_log_date</TH>
      <TH>IP_Address</TH>
      <TH>Login_count</TH>
    </TR>
  </thead>
  <tbody>
...
...
  </tbody>
</TABLE>


HTH

I
0
 

Author Comment

by:sh00tar
ID: 16423888
gold is not a variable for me and I need to write the html inside the response.write
0
 

Author Comment

by:sh00tar
ID: 16423891
i don't quite know how to use the brackets properly, almost always gives me an error when I try to use complex quotations in script
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 17

Accepted Solution

by:
HuyBD earned 2000 total points
ID: 16423892
the FONT tag is not effected with table style, so try this

     Response.write "<center>"
     Response.write "<TABLE BORDER=1>"
     Response.write "<TR style=""color: gold"">"
     Response.write "<TH>User_name</TH>"
     Response.write "<TH>Last_log_date</TH>"
     Response.write "<TH>IP_Address</TH>"
     Response.write "<TH>Login_count</TH>"
     Response.write "</TR>"
....
0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 16423896
Hi sh00tar,

<TABLE BORDER=1>
  <thead>
    <TR style="COLOR: golà">
      <TH>User_name</TH>
      <TH>Last_log_date</TH>
      <TH>IP_Address</TH>
      <TH>Login_count</TH>
    </TR>
  </thead>
  <tbody>
...
...
  </tbody>
</TABLE>


regards

I
0
 

Author Comment

by:sh00tar
ID: 16424009
thankyou HuyBD, your suggestion works.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question