sh00tar
asked on
changing font color using response.write
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?
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?
ASKER
gold is not a variable for me and I need to write the html inside the response.write
ASKER
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
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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
<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
ASKER
thankyou HuyBD, your suggestion works.
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