Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP error on page recoded for w3c compliance

Status
Not open for further replies.

PSchubert

Technical User
Jun 6, 2006
50
AU
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>&#160;<input type=text name=txtTerms size=25> &#160;&#160;&#160;<b>Search in:</b>&#160;" & _
				"<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> &#160;" & _
				"<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=" 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>&#160;<input type=text name=txtTerms size=25> &#160;&#160;&#160;<b>Search in:</b>&#160;" & _
				"<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> &#160;" & _
				"<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"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]

<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'>" [red]Error occurs somewhere from here on[/red]

	       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>"

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

	       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, [red]IT DISPLAYED CORRECTLY![/red] (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
 
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.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
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>")
                [green]Response.write("<b>" & Session("name") & " Collection, Account #" & Session("number") & "<br><a href='logout.asp'>Logout</a></b><br>")[/green]

		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> " & _
		[green]Content = Content & "<tr><td style='text-align: right;'><b>Search for:</b> <input type=text name=txtTerms size=25>    <b>Search in:</b> " & _[/green]
		"<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
%>

[green]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL][/green]

<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>
[green]<body style="background-color: white; text-align: left;">[/green]

<br>

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

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

	<%
	Response.Write(Content)
	%>
</TABLE>
			
<TABLE Align = "Center" BORDER="1" CELLPADDING="2" CELLSPACING="2" WIDTH="85%">
[green]<table style="border: 1px; border-spacing: 2px; padding: 2px; width: 85%; text-align: center; margin: auto;">[/green]
<%
	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>"
	[green]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>"[/green]

[red]All the above amendments in green seem to be working fine[/red]

	rs.MoveFirst

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

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

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

		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>"
			[green]temp = " text-align: center;'></b><input type=hidden name='ItemNumber' value=" & rs("nfldItemNum") & "><input type=submit value='Go' class='GoButton'><b>"[/green]

		End If

		If i = 1 Then 
			temp = "<center>" & temp & "</center>"
			[green]temp = " text-align: center;'>" & temp[/green]
		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>"
				[green]temp = " color: #009900; text-align: center;'>" & InOut(temp + 1)[/green]
			Else
				If temp + 1 = 1 Then 
					temp = "</font><font FACE=""ARIAL"" SIZE=""1"" color = ""#FF0000""><center>" & InOut(temp + 1) & "</center></font>"
					[green]temp = " color: #FF0000; text-align: center;'>" & InOut(temp + 1)[/green]
				End If
			End If
		End If

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

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

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

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

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

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

		rs.MoveNext
	Loop

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

</TABLE>
</BODY>
</HTML>
 
Correction: the end of the above code block is:

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

</TABLE>
[green]</div>
</div>[/green]
</BODY>
</HTML>
 
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
 
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>&#160;<input type=text name=txtTerms size=25> &#160;&#160;&#160;<b>Search in:</b>&#160;" & _
         "<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> &#160;" & _
         "<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"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]

<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>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top