Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 September 14th, 2004, 08:48 PM
Authorized User
 
Join Date: Apr 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default help with ASP code

I have some code that I'm trying to add a CSS pseudoclass style for formatting purposes. Here is a snippet of the code I'm trying to add the pseudoclass to:

Dim tmpHTML
tmpHTML=""
tmpHTML = tmpHTML & "<table summary="""" id=""calendar"" cellspacing=""0"">" & Chr(10)
tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
tmpHTML = tmpHTML & "<tr id=""title"">" & Chr(10)
tmpHTML = tmpHTML & "<th colspan=""7"">" & Chr(10)
tmpHTML = tmpHTML & "<a href=""?EventDate=" & Server.URLEncode(DateAdd("m",-1, EventDate)) & """>#171;</a>" & CurMonthName & "#44;" & " "
tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" & Server.URLEncode(DateAdd("m",1,EventDate)) & """>#187;</a>"
tmpHTML = tmpHTML & "</th>" & Chr(10) & "</tr>" & Chr(10) & "<tr id=""days"">"
Response.Write(tmpHTML)

I have setup the following styles for links:

table#calendar a:link {
 color: #0000FF;
 font-weight: bold;
 background-color: #CDD3C5;
}
table#calendar a:visited {
 color: #0000FF;
 font-weight: bold;
 background-color: #CDD3C5;
}
table#calendar a:hover {
 background: #860326;
 font-weight: bold;
 color: #FFFFFF;
}

I would like to create another pseudoclass that would apply to the links in these lines:

tmpHTML = tmpHTML & "<a href=""?EventDate=" & Server.URLEncode(DateAdd("m",-1, EventDate)) & """>#171;</a>" & CurMonthName & "#44;" & " "

tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" & Server.URLEncode(DateAdd("m",1,EventDate)) & """>#187;</a>"

I've made several attempts without any luck. Can anyone offer any suggestions on how I can do this?
I have the new pseudoclass styles defined as follows:

.month a:link {
...
}
.month a:visited {
...
}
.month a:hover {
...
}

Thanks for any help.
-D-

 
Old September 15th, 2004, 07:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Try

a.month:link
a.month:visited
a.month:hover

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Coverting asp code to asp.net 2.0 swintle ASP.NET 2.0 Basics 2 June 26th, 2007 01:22 AM
code clinic - Why wont example asp code work? jardbf Classic ASP Basics 3 April 27th, 2006 06:22 PM





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