help with ASP code

D

-D-

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)) & """>«</a>" &
CurMonthName & "," & " "
tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</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)) & """>«</a>" &
CurMonthName & "," & " "

tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</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-
 
R

Ray Costanzo [MVP]

Although you're using ASP to response.write your HTML, CSS is off-topic for
this group. I suggest you take a copy of a view-source and post that to a
CSS group with your question.

Ray at home
 
D

-D-

Ray,
Sorry if the questions was off-topic. I honestly didn't realize that it
was. I had initially tried some other groups, but to no avail. I felt the
question was really tailored for an ASP group since I am trying to determine
how to properly place the CSS class into the ASP code. I did not see that
is was a CSS question.

Either way, if so, my apologies. It was unintentional.

If anyone does read the thread and can help, it would be greatly
appreciated. Thank you.
-D-
 
R

Ray Costanzo [MVP]

Firstly, there's no need to apologize. I wasn't "yelling" or whatever, just
saying that you should have better luck elsewhere. But, if you didn't, you
didn't. Damn those CSS people! ;]

I think that step 1 is to forget about the ASP part of it and just make
yourself an html file. After you have your CSS issues worked out, then
worry about response.writing it all out. (I'm not really sure why you're
response.writing the whole thing anyway instead of taking advantage of the
interlacing power of ASP!)

Ray at home
 
D

-D-

Thanks Ray,
The reason behind how the code is written is because I was using a
Dreamweaver extension for an ASP calendar. The ASP in the original post is
a portion of the code produced. The entire code for the calendar can be
placed anywhere within the body of the HTML page. The code for the calendar
is a function and I call the function into a div within the body of the
page. Problem is, I was trying to modify and tailor the ASP code in the
function and place the CSS class style so I could format the calendar
differently.

I figure if I keep trying variations, I'll find the solution. Working
through all those quotations is a nightmare though.
-D-


Ray Costanzo said:
Firstly, there's no need to apologize. I wasn't "yelling" or whatever, just
saying that you should have better luck elsewhere. But, if you didn't, you
didn't. Damn those CSS people! ;]

I think that step 1 is to forget about the ASP part of it and just make
yourself an html file. After you have your CSS issues worked out, then
worry about response.writing it all out. (I'm not really sure why you're
response.writing the whole thing anyway instead of taking advantage of the
interlacing power of ASP!)

Ray at home

-D- said:
Ray,
Sorry if the questions was off-topic. I honestly didn't realize that it
was. I had initially tried some other groups, but to no avail. I felt the
question was really tailored for an ASP group since I am trying to determine
how to properly place the CSS class into the ASP code. I did not see that
is was a CSS question.

Either way, if so, my apologies. It was unintentional.

If anyone does read the thread and can help, it would be greatly
appreciated. Thank you.
-D-


off-topic
for
to
a add
the
 
K

Ken Schaefer

What you need to do is a "view source" in your browser and look at the
output. Work out what is wrong with the output, then work out what you need
to change in the ASP code that generates the output (this is all assuming
that you can actually achieve what you want to achieve). So, Ray's
suggestion is good: just write out plain HTML + CSS that works. Then write
some ASP code to generate the HTML/CSS.

Cheers
Ken

-D- said:
Thanks Ray,
The reason behind how the code is written is because I was using a
Dreamweaver extension for an ASP calendar. The ASP in the original post
is
a portion of the code produced. The entire code for the calendar can be
placed anywhere within the body of the HTML page. The code for the
calendar
is a function and I call the function into a div within the body of the
page. Problem is, I was trying to modify and tailor the ASP code in the
function and place the CSS class style so I could format the calendar
differently.

I figure if I keep trying variations, I'll find the solution. Working
through all those quotations is a nightmare though.
-D-


Ray Costanzo said:
Firstly, there's no need to apologize. I wasn't "yelling" or whatever, just
saying that you should have better luck elsewhere. But, if you didn't, you
didn't. Damn those CSS people! ;]

I think that step 1 is to forget about the ASP part of it and just make
yourself an html file. After you have your CSS issues worked out, then
worry about response.writing it all out. (I'm not really sure why you're
response.writing the whole thing anyway instead of taking advantage of
the
interlacing power of ASP!)

Ray at home

-D- said:
Ray,
Sorry if the questions was off-topic. I honestly didn't realize that
it
was. I had initially tried some other groups, but to no avail. I felt the
question was really tailored for an ASP group since I am trying to determine
how to properly place the CSS class into the ASP code. I did not see that
is was a CSS question.

Either way, if so, my apologies. It was unintentional.

If anyone does read the thread and can help, it would be greatly
appreciated. Thank you.
-D-


"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message Although you're using ASP to response.write your HTML, CSS is off-topic
for
this group. I suggest you take a copy of a view-source and post that
to
a
CSS group with your question.

Ray at home

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)
 
D

Dave

-D- said:
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)) & """>«</a>" &
CurMonthName & "," & " "
tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</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)) & """>«</a>" &
CurMonthName & "," & " "

tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</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-

Try the following (note changes to both the CSS and ASP code):

table#calendar a.month:link {...}
table#calendar a.month:visited {...}
table#calendar a.hover:hover {...}

tmpHTML = tmpHTML & "<a class=""month"" href=""?EventDate=" &
Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
CurMonthName & "," & " "

I question where you have the closing tag for the anchor ( the "</a>"), but
I assume that this is what you want...

Dave
 
D

Dave

Dave said:
Try the following (note changes to both the CSS and ASP code):

table#calendar a.month:link {...}
table#calendar a.month:visited {...}
table#calendar a.hover:hover {...}

tmpHTML = tmpHTML & "<a class=""month"" href=""?EventDate=" &
Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
CurMonthName & "," & " "

I question where you have the closing tag for the anchor ( the "</a>"),
but I assume that this is what you want...

Dave

Ooops.

table#calendar a.hover:hover {...} was supposed to be table#calendar
a.month:hover {...}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top