Wrox Programmer Forums
|
BOOK: Beginning JavaScript
This is the forum to discuss the Wrox book Beginning JavaScript by Paul Wilton; ISBN: 9780764544057
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2004, 05:42 AM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change fontcolor

Hi

I have a list where I get posts from a db. When I click a post the text opens in another frame and the list is still visible.
I would like to put another fontcolor on the link that is chosen. Could be don with a class.
I know how to do it in asp:
EX.
Code:
<%
if Clng(reqID)=rs("ID") then
Response.Write("<span class='active'>")
else
Response.Write("</span>")
end if
%>
but this list is delivered to med in JavaScript.
Here is some of the code
Code:
<script language="javascript" src="http://....asp"></script>
<script language="javascript">
if (0 == jobData.length)    
{
    document.write ('<tr><td>Some text</td></tr>')
}
else    
{
    for (i = 0; i < jobData.length; i++)    
    {
        document.write ('<tr>')
        document.write ('<td><a href=show.asp?jobid=' + jobData[i][0] + ' target=content>')

        document.write ( jobData[i][2] )
        document.write ('</a></td>');     
        document.write ('</tr>')
    }
}
</script>
Hope anyone can help me

/Lucas





Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdownlist change jeh3404 ASP.NET 2.0 Basics 1 July 18th, 2007 10:14 PM
What Do I Change? myself Classic ASP Basics 2 August 1st, 2006 04:01 PM
Change Event Help BryanBrassell Excel VBA 4 July 29th, 2004 03:42 PM
change z-index anshul Javascript How-To 1 July 27th, 2004 03:19 AM
Why does it change kilika VBScript 0 September 18th, 2003 05:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.