INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

ASP error on page recoded for w3c compliance

ASP error on page recoded for w3c compliance

(OP)
Odd situation here. Hugest thanks if you can help me solve it! I'm betting you can, because on this forum I've found solutions to all but one of my posts!

This page displays as intended:

CODE

<%@ LANGUAGE="VBSCRIPT" %>
<%   
Option Explicit

	'Response.Buffer = True

	'Check if user is logged in
	If Session("name") = "" and Session("number")="" Then
		'If not, go to login page
		Response.Redirect("login.asp")
	End If

	If Request.Cookies("Pvp91sZG") = "PhdZuT7O" Then
		Response.Redirect("../AccessDenied.htm")
	End If

	If Request.Cookies("dhcpFn4H") = "2twVlXrx" Then

		Dim strIP
		Dim conn			
		Dim rs			
		Dim strSQL			
		Dim strConnection		
		Dim AcctNum
		Dim i
		Dim InOut
		Dim temp
		Dim Content

		Content = ""

		Set conn = Server.CreateObject("ADODB.Connection")
		Set rs = Server.CreateObject("ADODB.Recordset")

		strConnection = "FILEDSN=" & Server.MapPath("SACA.dsn") & ";DBQ=" & Server.MapPath(Session("db")) & ";"

		AcctNum = Session("number")

		conn.Open strConnection

		strSQL = "SELECT nfldButton, nfldItemNum, ynfldCheckInOut, tfldArtist, tfldTitle, tfldMedia, tfldLocation FROM tblItems WHERE nfldAccountNum=" & AcctNum & " ORDER BY idxItems ASC;"

		InOut = array("IN", "OUT")

		set rs = conn.Execute (strSQL)

		If (rs.BOF and rs.EOF) Then
			Response.Write "No records have yet been entered for this account."
			Response.End

			rs.Close
			conn.close
			set rs=nothing
			set conn=nothing
			Response.End
		End If

		Response.Write("<TITLE>" & Session("name") & " Collection</TITLE>")
		Response.write("<left><b>" & Session("name") & " Collection, Account #" & Session("number") & "<br><a href=logout.asp>Logout</a></b></left><br>")

		Content = Content & "<FORM NAME=frmSearch METHOD=POST ACTION=clxnsrch.asp>"
		Content = Content & "<TR><TD Align=right><b>Search for:</b> <input type=text name=txtTerms size=25>    <b>Search in:</b> " & _
				"<select name=selField size=1>" & _
  					"<option value=Artist>Artist</option>" & _
  					"<option value=Title>Title</option>" & _
  					"<option value=Media>Media</option>" & _
  					"<option value=Location>Location</option>" & _
  					"<option value=All>All</option>" & _
				"</select>  " & _
				"<input type=submit name=btnSearch value=Search></TD></TR></FORM>"
	Else
		Response.Redirect("login.asp")
	End If
%>

<HTML>
<HEAD>
	<style type="text/css">
	<!--
	INPUT {
   		font-family: ;
   		font-size: ;
   		font-weight: ;
   		color: ;
   		background-color: ;
   		padding: ;
   		height: ;
   		width: ;
	} 
	INPUT.GoButton { 
		background-color: ; 
		border-color: ;
		color: ; 
		font-family: arial, verdana, ms sans serif; 
		font-weight: normal; 
		font-size: 6pt; 
		text-align: center; 
		height: 15px; 
		width: 40px;
	} 
	--> 
	</style>
</HEAD>

<BODY>

<br>
<TABLE Align = "Center" BORDER="0" CELLPADDING="2" CELLSPACING="2" WIDTH="85%">
	<%
	Response.Write(Content)
	%>
</TABLE>
			
<TABLE Align = "Center" BORDER="1" CELLPADDING="2" CELLSPACING="2" WIDTH="85%">

<%
	Response.Write "<TR BGCOLOR=""#CCCCCC""><TH> </TH><TH>Item Number</TH><TH>IN / OUT</TH><TH>Artist</TH><TH>Title</TH><TH>Media</TH><TH>Location</TH></TR>"

	rs.MoveFirst

	Do While Not rs.EOF
		Response.Write "<TR><FORM Action='item.asp' Method='Post'>"

		For i = 0 to rs.Fields.Count - 1

		temp = rs.Fields(i)

		If i = 0 Then
			temp = "</b></font><center><INPUT Type=Hidden Name='ItemNumber' Value=" & rs("nfldItemNum") & "><input type=Submit value=Go class='GoButton'></center><font><b>"

		End If

		If i = 1 Then 
			temp = "<center>" & temp & "</center>"
		End If

		If i = 2 Then
			If temp + 1 = 0 Then 
				temp = "</font><font FACE=""ARIAL"" SIZE=""1"" color = ""#009900""><center>" & InOut(temp + 1) & "</center></font>"
			Else
				If temp + 1 = 1 Then 
					temp = "</font><font FACE=""ARIAL"" SIZE=""1"" color = ""#FF0000""><center>" & InOut(temp + 1) & "</center></font>"
				End If
			End If
		End If

		If i = 4 Then temp = "<i>" & temp & "</i>"
	
        	Response.Write "<TD><FONT FACE=""ARIAL"" SIZE=""1""><b>" & temp & "</b></font></TD>"


		Next
		Response.write "</FORM></TR>"

		rs.MoveNext
	Loop

	rs.Close
	set rs = Nothing
	conn.Close
	set conn = Nothing
%>

</TABLE>
</BODY>
</HTML> 

When I attempt to bring it into w3c compliance, i.e. disuse deprecated tags (code below), I get this error message displayed after the search form: "An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click <a href="http://go.microsoft.com/fwlink/?LinkID=82731">here</a> to find out more about this error." Of course the link is too general (or I'm not smart enough) to shed any light on the problem causing the issue.

CODE

<%@ LANGUAGE="VBSCRIPT" %>
<%   
Option Explicit

	'Response.Buffer = True

	'Check if user is logged in
	If Session("name") = "" and Session("number")="" Then
		'If not, go to login page
		Response.Redirect("login.asp")
	End If

	If Request.Cookies("Pvp91sZG") = "PhdZuT7O" Then
		Response.Redirect("../AccessDenied.htm")
	End If

	If Request.Cookies("dhcpFn4H") = "2twVlXrx" Then

		Dim strIP
		Dim conn			
		Dim rs			
		Dim strSQL			
		Dim strConnection		
		Dim AcctNum
		Dim i
		Dim InOut
		Dim temp
		Dim Content

		Content = ""

		Set conn = Server.CreateObject("ADODB.Connection")
		Set rs = Server.CreateObject("ADODB.Recordset")

		strConnection = "FILEDSN=" & Server.MapPath("SACA.dsn") & ";DBQ=" & Server.MapPath(Session("db")) & ";"

		AcctNum = Session("number")

		conn.Open strConnection

		strSQL = "SELECT nfldButton, nfldItemNum, ynfldCheckInOut, tfldArtist, tfldTitle, tfldMedia, tfldLocation FROM tblItems WHERE nfldAccountNum=" & AcctNum & " ORDER BY idxItems ASC;"

		InOut = array("IN", "OUT")

		set rs = conn.Execute (strSQL)

		If (rs.BOF and rs.EOF) Then
			Response.Write "No records have yet been entered for this account."
			Response.End

			rs.Close
			conn.close
			set rs=nothing
			set conn=nothing
			Response.End
		End If

		Response.Write("<title>" & Session("name") & " Collection</title>")
		Response.write("<b>" & Session("name") & " Collection, Account #" & Session("number") & "<br><a href='logout.asp'>Logout</a></b><br>")

		Content = Content & "<form name=frmSearch method=post action=clxnsrch.asp>"
		Content = Content & "<tr><td style='text-align: right;'><b>Search for:</b> <input type=text name=txtTerms size=25>    <b>Search in:</b> " & _
				"<select name=selField size=1>" & _
  					"<option value=Artist>Artist</option>" & _
  					"<option value=Title>Title</option>" & _
  					"<option value=Media>Media</option>" & _
  					"<option value=Location>Location</option>" & _
  					"<option value=All>All</option>" & _
				"</select>  " & _
				"<input type=submit name=btnSearch value=Search></td></tr></form>"
	Else
		Response.Redirect("login.asp")
	End If
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

   <head>

      <style type="text/css">
         <!--

	 input {
   	    font-family: ;
   	    font-size: ;
   	    font-weight: ;
   	    color: ;
   	    background-color: ;
   	    padding: ;
   	    height: ;
   	    width: ;
	    }

	 input.GoButton { 
	    background-color: ; 
	    border-color: ;
	    color: ; 
	    font-family: arial, verdana, ms sans serif; 
	    font-weight: normal; 
	    font-size: 6pt; 
	    text-align: center; 
	    height: 15px; 
	    width: 40px;
	    } 
	 --> 
      </style>

   </head>

   <body style="background-color: white; text-align: left;">
      <br>
         <div style="text-align: center;">
         <div style="width: 85%; margin-left: auto; margin-right: auto;">

         <table style="border: none; border-spacing: 2px; padding: 2px; width: 85%; text-align: center; margin: auto;">

	    <%
	    Response.Write(Content)
	    %>

         </table>
			
    	 <table style="border: 1px; border-spacing: 2px; padding: 2px; width: 85%; text-align: center; margin: auto;">

	    <%
	    Response.Write "<tr style='background-color: #CCCCCC;'><th> </th><th>Item Number</th><th>IN / OUT</th><th>Artist</th><th>Title</th><th>Media</th><th>Location</th></tr>"

	    rs.MoveFirst

	    Do While Not rs.EOF
	       Response.Write "<tr><form action='item.asp' method='post'>" Error occurs somewhere from here on

	       For i = 0 to rs.Fields.Count - 1

	       temp = rs.Fields(i)

	       tdata = "<b><td style='font-family: arial; font-size: xx-small;"

	       If i = 0 Then
	          temp = " text-align: center;'></b><input type=hidden name='ItemNumber' value=" & rs("nfldItemNum") & "><input type=submit value='Go' class='GoButton'><b>"

	       End If

	       If i = 1 Then 
	          temp = " text-align: center;'>" & temp
	       End If

	       If i = 2 Then
	          If temp + 1 = 0 Then 
	             temp = " color: #009900; text-align: center;'>" & InOut(temp + 1)
	          Else
	             If temp + 1 = 1 Then 
	                temp = " color: #FF0000; text-align: center;'>" & InOut(temp + 1)
	             End If
	          End If
	       End If

	       If i = 4 Then temp = "<i>" & temp & "</i>"

               Response.Write tdata & "" & temp & "</b></td>" 

	       Next
	       Response.write "</form></tr>"

	       rs.MoveNext
	    Loop

	    rs.Close
	    set rs = Nothing
	    conn.Close
	    set conn = Nothing
	    %>

          </table>
          </div>
          </div>
   </body>
</html> 

In the green line, I also tried instead:

CODE

Response.Write(tdata)
Response.Write(temp) & "</b></td>" 

and

CODE

WriteData = tdata & "" & temp & "</b></td>"
Response.Write(WriteData) 

Here's the really odd thing: with the first try at w3c compliance, the error was thrown, I visited the link in the error message, and then when I hit the back button to return to the asp page, IT DISPLAYED CORRECTLY! (forehead slap and a WTF). Refreshing the page threw the error again.
I've also tried changing single quotation marks for double double quotation marks within the vbscript; remarking out lines and stepping through them one by one to isolate the error. I just don't have enough savvy to suss it out, I guess. You guys and girls rock, though--I'll bet you'll see it in one minute flat. Sorry for all the lengthiness.

Thanks in advance,
Phillip

RE: ASP error on page recoded for w3c compliance

If it works why do you even bother with a W3c spell check??

And assuming this is on IIS7 you need to get a full error message rather than the Microsoft generic "Something went wrong" message.

http://www.iis.net/learn/troubleshoot/diagnosing-h...

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: ASP error on page recoded for w3c compliance

(OP)
Hi Chris,

Thank you for your reply. I've asked myself the same question, and the answer is that if/when browsers stop supporting deprecated html tags, my pages won't work anymore, so I'm trying to be proactive at avoiding that situation. Thanks for the link.
I apologise to all for the copious code, it's much too onerous to read. I should have simplified it. I've reposted it below to that end. The working version is in black, with lines that have changed syntax or been added below in green, and comments in red. Meanwhile, I'll keep plugging away at discovering a solution. Thanks again to all.

CODE

<%@ LANGUAGE="VBSCRIPT" %>
<%   
Option Explicit

	'Response.Buffer = True

	'Check if user is logged in
	If Session("name") = "" and Session("number")="" Then
		'If not, go to login page
		Response.Redirect("login.asp")
	End If

	If Request.Cookies("Pvp91sZG") = "PhdZuT7O" Then
		Response.Redirect("../AccessDenied.htm")
	End If

	If Request.Cookies("dhcpFn4H") = "2twVlXrx" Then

		Dim strIP
		Dim conn			
		Dim rs			
		Dim strSQL			
		Dim strConnection		
		Dim AcctNum
		Dim i
		Dim InOut
		Dim temp
		Dim Content

		Content = ""

		Set conn = Server.CreateObject("ADODB.Connection")
		Set rs = Server.CreateObject("ADODB.Recordset")

		strConnection = "FILEDSN=" & Server.MapPath("SACA.dsn") & ";DBQ=" & Server.MapPath(Session("db")) & ";"

		AcctNum = Session("number")

		conn.Open strConnection

		strSQL = "SELECT nfldButton, nfldItemNum, ynfldCheckInOut, tfldArtist, tfldTitle, tfldMedia, tfldLocation FROM tblItems WHERE nfldAccountNum=" & AcctNum & " ORDER BY idxItems ASC;"

		InOut = array("IN", "OUT")

		set rs = conn.Execute (strSQL)

		If (rs.BOF and rs.EOF) Then
			Response.Write "No records have yet been entered for this account."
			Response.End

			rs.Close
			conn.close
			set rs=nothing
			set conn=nothing
			Response.End
		End If

		Response.Write("<TITLE>" & Session("name") & " Collection</TITLE>")
		Response.write("<left><b>" & Session("name") & " Collection, Account #" & Session("number") & "<br><a href=logout.asp>Logout</a></b></left><br>")
                Response.write("<b>" & Session("name") & " Collection, Account #" & Session("number") & "<br><a href='logout.asp'>Logout</a></b><br>")

		Content = Content & "<FORM NAME=frmSearch METHOD=POST ACTION=clxnsrch.asp>"
		Content = Content & "<TR><TD Align=right><b>Search for:</b> <input type=text name=txtTerms size=25>    <b>Search in:</b> " & _
		Content = Content & "<tr><td style='text-align: right;'><b>Search for:</b> <input type=text name=txtTerms size=25>    <b>Search in:</b> " & _
		"<select name=selField size=1>" & _
  					"<option value=Artist>Artist</option>" & _
  					"<option value=Title>Title</option>" & _
  					"<option value=Media>Media</option>" & _
  					"<option value=Location>Location</option>" & _
  					"<option value=All>All</option>" & _
				"</select>  " & _
				"<input type=submit name=btnSearch value=Search></TD></TR></FORM>"
	Else
		Response.Redirect("login.asp")
	End If
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<HTML>
<HEAD>
	<style type="text/css">
	<!--
	INPUT {
   		font-family: ;
   		font-size: ;
   		font-weight: ;
   		color: ;
   		background-color: ;
   		padding: ;
   		height: ;
   		width: ;
	} 
	INPUT.GoButton { 
		background-color: ; 
		border-color: ;
		color: ; 
		font-family: arial, verdana, ms sans serif; 
		font-weight: normal; 
		font-size: 6pt; 
		text-align: center; 
		height: 15px; 
		width: 40px;
	} 
	--> 
	</style>
</HEAD>

<BODY>
<body style="background-color: white; text-align: left;">

<br>

<div style="text-align: center;">
<div style="width: 85%; margin-left: auto; margin-right: auto;">

<TABLE Align = "Center" BORDER="0" CELLPADDING="2" CELLSPACING="2" WIDTH="85%">
<table style="border: none; border-spacing: 2px; padding: 2px; width: 85%; text-align: center; margin: auto;">

	<%
	Response.Write(Content)
	%>
</TABLE>
			
<TABLE Align = "Center" BORDER="1" CELLPADDING="2" CELLSPACING="2" WIDTH="85%">
<table style="border: 1px; border-spacing: 2px; padding: 2px; width: 85%; text-align: center; margin: auto;">
<%
	Response.Write "<TR BGCOLOR=""#CCCCCC""><TH> </TH><TH>Item Number</TH><TH>IN / OUT</TH><TH>Artist</TH><TH>Title</TH><TH>Media</TH><TH>Location</TH></TR>"
	Response.Write "<tr style='background-color: #CCCCCC;'><th> </th><th>Item Number</th><th>IN / OUT</th><th>Artist</th><th>Title</th><th>Media</th><th>Location</th></tr>"

All the above amendments in green seem to be working fine

	rs.MoveFirst

	Do While Not rs.EOF
		Response.Write "<TR><FORM Action='item.asp' Method='Post'>"Error occurs somewhere from here on

		For i = 0 to rs.Fields.Count - 1

		temp = rs.Fields(i)
		tdata = "<b><td style='font-family: arial; font-size: xx-small;" added variable to eliminate using <font> and <center>

		If i = 0 Then
			temp = "</b></font><center><INPUT Type=Hidden Name='ItemNumber' Value=" & rs("nfldItemNum") & "><input type=Submit value=Go class='GoButton'></center><font><b>"
			temp = " text-align: center;'></b><input type=hidden name='ItemNumber' value=" & rs("nfldItemNum") & "><input type=submit value='Go' class='GoButton'><b>"

		End If

		If i = 1 Then 
			temp = "<center>" & temp & "</center>"
			temp = " text-align: center;'>" & temp
		End If

		If i = 2 Then
			If temp + 1 = 0 Then 
				temp = "</font><font FACE=""ARIAL"" SIZE=""1"" color = ""#009900""><center>" & InOut(temp + 1) & "</center></font>"
				temp = " color: #009900; text-align: center;'>" & InOut(temp + 1)
			Else
				If temp + 1 = 1 Then 
					temp = "</font><font FACE=""ARIAL"" SIZE=""1"" color = ""#FF0000""><center>" & InOut(temp + 1) & "</center></font>"
					temp = " color: #FF0000; text-align: center;'>" & InOut(temp + 1)
				End If
			End If
		End If

		If i = 4 Then temp = "<i>" & temp & "</i>"

        	It seems that assembling the table as below, incorporating the above variables, is where the error is generated

        	Response.Write "<TD><FONT FACE=""ARIAL"" SIZE=""1""><b>" & temp & "</b></font></TD>"
        	Response.Write tdata & "" & temp & "</b></td>" also tried instead of this line:

        	Response.Write(tdata)
        	Response.Write(temp) & "</b></td>" also tried:

        	WriteData = tdata & "" & temp & "</b></td>" added a variable to hold both values and include closing tags
        	Response.Write(WriteData)

		Next
		Response.write "</FORM></TR>"

		rs.MoveNext
	Loop

	rs.Close
	set rs = Nothing
	conn.Close
	set conn = Nothing
%>

</TABLE>
</BODY>
</HTML> 

RE: ASP error on page recoded for w3c compliance

(OP)
Correction: the end of the above code block is:

CODE

rs.Close
	set rs = Nothing
	conn.Close
	set conn = Nothing
%>

</TABLE>
</div>
</div>
</BODY>
</HTML> 

RE: ASP error on page recoded for w3c compliance

I've always avoided the use "" to escape quotes because it is all too esy to miss one and 'break' the code. So instead of

CODE -->

""" 

CODE -->

..."&chr(34)&" ... 


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: ASP error on page recoded for w3c compliance

(OP)
I've solved it, by: 1. examining the output (page source) of the working version; 2. using that to replace the deprecated html with current html; 3. replacing with the new html and testing variable values one at a time. There were a few mistakes in my previous attempts, including a couple that should have been obvious to me! If anyone's interested, here's the final version:

CODE

<%@ LANGUAGE="VBSCRIPT" %>
<%   
Option Explicit

   'Response.Buffer = True

   'Check if user is logged in
   If Session("name") = "" and Session("number")="" Then
      'If not, go to login page
      Response.Redirect("login.asp")
   End If

   If Request.Cookies("Pvp91sZG") = "PhdZuT7O" Then
      Response.Redirect("../AccessDenied.htm")
   End If

   If Request.Cookies("dhcpFn4H") = "2twVlXrx" Then

      Dim strIP
      Dim conn			
      Dim rs			
      Dim strSQL			
      Dim strConnection		
      Dim AcctNum
      Dim i
      Dim InOut
      Dim temp
      Dim Content

      Content = ""

      Set conn = Server.CreateObject("ADODB.Connection")
      Set rs = Server.CreateObject("ADODB.Recordset")

      strConnection = "FILEDSN=" & Server.MapPath("SACA.dsn") & ";DBQ=" & Server.MapPath(Session("db")) & ";"

      AcctNum = Session("number")

      conn.Open strConnection

      strSQL = "SELECT nfldButton, nfldItemNum, ynfldCheckInOut, tfldArtist, tfldTitle, tfldMedia, tfldLocation FROM tblItems WHERE nfldAccountNum=" & AcctNum & " ORDER BY idxItems ASC;"

      InOut = array("IN", "OUT")

      set rs = conn.Execute (strSQL)

      If (rs.BOF and rs.EOF) Then
         Response.Write "No records have yet been entered for this account."
         Response.End

         rs.Close
         conn.close
         set rs=nothing
         set conn=nothing
         Response.End
      End If

      Response.Write("<title>" & Session("name") & " Collection</title>")
      Response.write("<b>" & Session("name") & " Collection, Account #" & Session("number") & "<br><a href='logout.asp'>Logout</a></b><br>")

      Content = Content & "<form name=frmSearch method=post action=clxnsrch.asp>"
      Content = Content & "<tr><td style='text-align: right;'><b>Search for:</b> <input type=text name=txtTerms size=25>    <b>Search in:</b> " & _
         "<select name=selField size=1>" & _
            "<option value=Artist>Artist</option>" & _
            "<option value=Title>Title</option>" & _
            "<option value=Media>Media</option>" & _
            "<option value=Location>Location</option>" & _
            "<option value=All>All</option>" & _
         "</select>  " & _
         "<input type=submit name=btnSearch value=Search></td></tr></form>"
   Else
         Response.Redirect("login.asp")
   End If
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

   <head>

      <style type="text/css">
         <!--

	 input.GoButton { 
	    background-color: ; 
	    border-color: ;
	    color: ; 
	    font-family: arial, verdana, ms sans serif; 
	    font-weight: normal; 
	    font-size: 6pt; 
	    text-align: center;
	    width: 40px; 
	    display: table-cell;
	    vertical-align: middle;
	    } 
	 --> 
      </style>

   </head>

   <body style="background-color: white; text-align: left;">
      <br>
         <div style="text-align: center;">
         <div style="width: 85%; margin-left: auto; margin-right: auto;">

         <table style="border: none; border-spacing: 2px; padding: 2px; width: 85%; text-align: center; margin: auto;">

	    <%
	    Response.Write(Content)
	    %>

         </table>
			
    	 <table style="border-style: solid; border-spacing: 2px; border-width: 2px; border-color:#CCCCCC; padding: 2px; width: 85%; margin: auto;">

	    <%
	    Response.Write "<tr style='background-color: #CCCCCC;'><th> </th><th>Item Number</th><th>IN / OUT</th><th>Artist</th><th>Title</th><th>Media</th><th>Location</th></tr>"

	    rs.MoveFirst

	    Do While Not rs.EOF
	       Response.Write "<tr><form action='item.asp' method='post'>"

	       For i = 0 to rs.Fields.Count - 1	  

	       temp = rs.Fields(i)

	       If i = 0 Then
		  temp = " text-align: center;'><input type=hidden name='ItemNumber' value=" & rs("nfldItemNum") & "><input type=submit value=Go class='GoButton'>"
	       End If

	       If i = 1 Then
	          temp = " text-align: center;'>" & temp
	       End If

	       If i = 2 Then
	          If temp + 1 = 0 Then
	             temp = " text-align: center; color: #009900;'>" & InOut(temp + 1)
	          Else
	             If temp + 1 = 1 Then
	                temp = " text-align: center; color: #FF0000;'>" & InOut(temp + 1)
	             End If
	          End If
	       End If

	       If i = 3 Then
		  temp = " text-align: left;'>" & temp
	       End If

	       If i = 4 Then
		  temp = " text-align: left;'><i>" & temp & "</i>"
	       End If

	       If i > 4 Then
		 temp = " text-align: left;'>" & temp
	       End If

	       Response.Write "<td style='font-family: arial; font-size: xx-small; font-weight: bold; border-style: solid; border-width: 1px; border-color: #CCCCCC;" & temp & "</td>"

	       Next
	       Response.write "</form></tr>"

	       rs.MoveNext
	    Loop

	    rs.Close
	    set rs = Nothing
	    conn.Close
	    set conn = Nothing
	    %>

          </table>
          </div>
          </div>
   </body>
</html> 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close