Forum Moderators: open

Message Too Old, No Replies

asp & ordered lists

         

fintan

9:26 am on Oct 14, 2002 (gmt 0)

10+ Year Member



Hi I pretty new to asp, I want to display an ordered list in a browser. Every time I do, I get "1" repeated all the way down the list. Could you tell me where I'm going wrong.

Response.write(" <ol type=1>"&vbcrlf)
Response.write(" <li>"&vbcrlf)
Response.Write("<a href=""traffic_between.asp"">Traffic Between a Pair of e-mail addresses for a given Time Range</a><br>")
Response.write(" <li>"&vbcrlf)
Response.Write("<a href=""tracks_message.asp"">Tracks message processing in parking or quarantine areas.</a><br>")
Response.write(" <li>"&vbcrlf)
Response.Write("<a href=""info_about.asp"">Information about the data types discovered in your e-mail.</a><br>")
Response.write(" </ol>"&vbcrlf)

This code surves up this

1.Traffic Between a Pair of e-mail addresses for a given Time Range
1.Tracks message processing in parking or quarantine areas.
1.Information about the data types discovered in your e-mail.

Oh and just for curiousity sake could you tell me is there a way in html to do an ordered list backward, say starting at 7 and ending at 1.

Thanks

Dreamquick

10:01 am on Oct 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I tried the basic example you gave and that works for me - three items numbered 1 to 3. You didn't state which browser you were using so it might be that your browser is the cause.

Additionally you might want to remove the <br> tags and instead put an </li> in their placem, also assuming that is the code you are running why not do it like this instead as it's far more readable;

%>
<ol type=1>
<li>
<a href="traffic_between.asp">Traffic Between a Pair of e-mail addresses for a given Time Range</a>
</li>
<li>
<a href="tracks_message.asp">Tracks message processing in parking or quarantine areas.</a>
</li>
<li>
<a href="info_about.asp">Information about the data types discovered in your e-mail.</a>
</li>
</ol>
<%

- Tony

fintan

11:06 am on Oct 14, 2002 (gmt 0)

10+ Year Member



I'm using ie6, you see that part of the script is the easy part. I agree it is messy but all of the code is done like that and I just wanted to make it more legeble to the user. Sorry I figured out what I was doing wrong you see I'm working off someone elses code and they left out
Response.write(" <table cellpadding=3 > <tr><td>"&vbcrlf)

and the closing the closing tag

Response.write(" </td></tr></able>" &vbcrlf)

Its always the most stupidest thing that you trip up on. So the code should look like this:

Response.write(" <table cellpadding=3 > <tr><td>"&vbcrlf)
Response.Write(" <ol><li><a href=""traffic_between.asp"">Traffic Between a Pair of e-mail addresses for a given Time Range</a></li>")

Response.Write("<li><a href=""tracks_message.asp"">Tracks message processing in parking or quarantine areas.</a></li>")

Response.Write("<li><a href=""info_about.asp"">Information about the data types discovered in your e-mail.</a></li>")

Response.Write("<li><a href=""details_message.asp"">Details message throughput by policy applied.</a></li>")

Response.Write("<li><a href=""mailsweeper.asp"">MAILsweeper processing performance information.</a></li>")

Response.Write("<li><a href=""top_recipient.asp"">The top recipient 10 addresses for this system.</a></li>")

Response.Write("<li><a href=""message_size.asp"">The top 50 message recipients judged by message size.</a></li>")
Response.Write("<li><a href=""mail_authors.asp"">Lists top mail authors.</a></li>")

Response.Write("<li><a href=""50_mail_authors.asp"">Lists top 50 mail authors that send the most bytes of e-mail.</a></li>")

Response.Write("<li><a href=""single_line.asp"">Single line message log</a></li>")

Response.Write("<li><a href=""processing_info.asp"">Processing information for messages delivered by MAILsweeper.</a></li></ol>")
Response.write(" </td></tr></table>"&vbcrlf)

What was left out was the <tr> & <td>. Anyway the reason its done like this is because its called on later in the page. Oh what about doing a html list backward. Thanks for your help.

fintan.