PDA

View Full Version : Color problem???


parallon
05-16-2006, 08:08 PM
Hello all. I have the following code that generates a hyperlink, and I need the text (End) after the hyperlink to be red. I tried the following code, but I can't seem to get it to work.

<head>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

And the following is imbeded within an ASP script:

Schedule(d) = "<a href=\""javascript:GetDetail('" & WOList & "')\"">" & Schedule(d) & "</a> " & "<span class="style1">(End)</span>"

Any help would be greatly appreciated,

Parallon

Spudhead
05-17-2006, 01:09 PM
You need double-double-quotes around "style1" when you're writing HTML using ASP.

ALWAYS look at the generated HTML when you're having a client-side problem with a server-side script.


Schedule(d) = "<a href=\""javascript:GetDetail('" & WOList & "')\"">" & Schedule(d) & "</a> " & "<span class=""style1"">(End)</span>"

degsy
05-17-2006, 03:19 PM
Also, use an editor with syntax highlighting. It will immediately highlight string errors such as this.