Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Thiago Gurgel

O que meu código está errado?

Recommended Posts

GEnte isto é um adiministrativo de produtos, inclui uma coluna nova no banco de dados, chamada COD_COMERCIAL, e tinha ja no bd a coluna codigo

 

no admin ele puxava o codigo, e trazia um checkbox se estava ativo ou nao, até ae tudo bem, depois quando eu inclui um campo puzando o valor do cod_comercial, ele puxa, só que nao puza o ativo e nada mais que estiver na frente dele no código, de uma olhadinha ...

 

<!-- #include file="seguranca.asp" -->
<!-- #include file="../conexao.asp" -->
<%
'========================================================================
'=================== CGI DO FORMULÁRIO DOS PRODUTOS =====================
'========================================================================

Set rsProdutos = Server.CreateObject("ADODB.RecordSet")
Set rsSubCategorias = Server.CreateObject("ADODB.RecordSet")
Set rsCategorias = Server.CreateObject("ADODB.RecordSet")

sAcao = Request.QueryString("acao")
cat = Request.QueryString("cat")
%>

<html>

<head>
<base target="_top">
</head>

<script language="JavaScript">
<!--
function ativa_campo(obj)
{
  obj.style.background = '#E9F3FD';
}

function desativa_campo(obj)
{
  obj.style.background = '#FFFFFF';
}

function redireciona(obj)
{
<% If (sAcao <> "") Then %>
  location = 'form_produtos.asp?acao=alt&cod='+<%= Request.QueryString("cod") %>+'&cat='+obj.value;
<% Else %>
  location = 'form_produtos.asp?cat='+obj.value;
<% End If %>
}

function ajustar_data(input)
{
	if ((event.keyCode<48)||(event.keyCode>57)){
		event.returnValue = false; 
		} else { 
		if ((input.value.length==2)||(input.value.length==5))
			input.value=input.value + "/";
	}
}

function check()
{ 
  if (document.form1.Codigo.value=="" || document.form1.Codigo.value.indexOf(" ")==0)
	 {alert("Favor digitar o código do produto...");
	   document.form1.Codigo.focus();
	   return false;}

  if (document.form1.Produto.value=="" || document.form1.Produto.value.indexOf(" ")==0)
	 {alert("Favor digitar o nome do produto...");
	   document.form1.Produto.focus();
	   return false;}

  if (document.form1.SubCategoria.value=="")
	 {alert("Favor selecionar a sub-categoria...");
	   document.form1.SubCategoria.focus();
	   return false;}

  if (document.form1.Categoria.value=="")
	 {alert("Favor selecionar a categoria...");
	   document.form1.Categoria.focus();
	   return false;}

  if (document.form1.Preco.value=="" || document.form1.Preco.value.indexOf(" ")==0)
	 {alert("Favor digitar o preço do produto...");
	   document.form1.Preco.focus();
	   return false;}

  if (document.form1.Peso.value=="" || document.form1.Peso.value.indexOf(" ")==0)
	 {alert("Favor digitar o peso do produto...");
	   document.form1.Peso.focus();
	   return false;}

  return true;
}
-->
</script>

<body topmargin="0" leftmargin="0">

<form method="POST" action="adm_produtos.asp" name="form1" onSubmit="return check()">
<table cellspacing="0" style="border-bottom:2px solid #3454A7; border-collapse:collapse" width="100%" id="AutoNumber1" height="100%" cellpadding="0" bordercolor="#111111">
  <tr>
	<td height="20" bgcolor="#3454A7" width="130"><b>
	<font face="Arial" size="2" color="#FFFFFF"> </font><u><font face="Arial" size="2"><a target="_top" href="index.asp"><font color="#FFFFFF">Página
		Principal</font></a></font></u></b></td>
	<td height="20" bgcolor="#3454A7"><b>
	<font face="Verdana" color="#FFFFFF" size="2">
	Cadastro de Produtos</font></b></td>
  </tr>
  <tr>
	<td colspan="2" align="center">
  <table cellspacing="0" id="AutoNumber1" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2" width="100%">
<%
Select Case sAcao
  Case "alt"
	SQL = "SELECT * FROM Produtos WHERE CodProduto = " & Request.QueryString("cod")
	rsProdutos.Open SQL, Conexao

	descricao = rsProdutos("Descricao")
	If (descricao <> "") Then
	  descricao = Replace(descricao,"<br>",vbCrLf)
	End If
	minidescricao = rsProdutos("MiniDescricao")
	If (minidescricao <> "") Then
	  minidescricao = Replace(minidescricao,"<br>",vbCrLf)
	End If
	preco = rsProdutos("Preco")
	peso = FormatNumber(rsProdutos("Peso"),2)
	foto1 = rsProdutos("Foto1")
	foto2 = rsProdutos("Foto2")
	foto3 = rsProdutos("Foto3")
	foto4 = rsProdutos("Foto4")
	foto5 = rsProdutos("Foto5")
	dtcadastro = rsProdutos("DtCadastro")

	
%>
	<tr>
	  <td>
	  <table border="0" cellspacing="0" width="100%" id="AutoNumber2" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2">
		<tr>
		  <td><b><font face="Verdana" size="1">Código</font></b><font size="1" face="Verdana"><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="50" --><input type="text" name="Codigo" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="50" value="<%= rsProdutos("Codigo") %>"></font></td><td><b><font face="Verdana" size="1">Código</font></b><font size="1" face="Verdana"><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="50" --><input type="text" name="Codigo" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="50" value="<%= rsProdutos("cod_comercial") %>">
		  </font></td>
		  <td><font size="1" face="Verdana"><b>Produto</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="255" --><input type="text" name="Produto" size="58" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="255" value="<%= rsProdutos("Produto") %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Categoria</b><br>
		  <select size="1" name="Categoria" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" onChange="redireciona(this)">
<% SQL = "SELECT * FROM Categorias ORDER BY Categoria"
   rsCategorias.Open SQL, Conexao
   If Not (rsCategorias.EOF) Then
	 If (cat = "") Then
	   categoria = rsProdutos("CodCategoria")
	 Else
	   categoria = cat
	 End If
	 While Not (rsCategorias.EOF)
	   If (rsCategorias("CodCategoria") = CInt(categoria)) Then %>
	  <option value="<%= rsCategorias("CodCategoria") %>" selected><%= rsCategorias("Categoria") %></option>
<%	 Else %>
	  <option value="<%= rsCategorias("CodCategoria") %>"><%= rsCategorias("Categoria") %></option>
<%	   End If
	   rsCategorias.MoveNext
	 Wend
   End If
   rsCategorias.Close %>
		  </select></font></td>
		  <td><font size="1" face="Verdana"><b>SubCategoria</b><br>
		  <select size="1" name="SubCategoria" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);">
<% If (cat <> "") Then %>
	  <option>Selecione</option>
<% End If
   SQL = "SELECT * FROM Subcategorias WHERE CodCategoria = " & CInt(categoria) & " ORDER BY SubCategoria"
   rsSubCategorias.Open SQL, Conexao
   If Not (rsSubCategorias.EOF) Then
	 While Not (rsSubCategorias.EOF)
	   If (rsSubCategorias("CodSubCategoria") = rsProdutos("CodSubCategoria")) Then %>
	  <option value="<%= rsSubCategorias("CodSubCategoria") %>" selected><%= rsSubCategorias("SubCategoria") %></option>
<%	 Else %>
	  <option value="<%= rsSubCategorias("CodSubCategoria") %>"><%= rsSubCategorias("SubCategoria") %></option>
<%	   End If
	   rsSubCategorias.MoveNext
	   Wend
   End If
   rsSubCategorias.Close %>
		  </select></font></td>
		</tr>
	  </table>
	  </td>
	</tr>
	<tr>
	  <td>
	  <table border="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber3">
		<tr>
		  <td rowspan="2"><font size="1" face="Verdana"><b>Descrição</b><br>
			<textarea rows="5" name="textarea" cols="50" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);"><%= descricao %></textarea></td>
		  <td rowspan="2"><font size="1" face="Verdana"><b>Mini Descrição</b><br>
		  <textarea rows="5" name="MiniDescricao" cols="40" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);"><%= minidescricao %></textarea></td>
		  <td><font size="1" face="Verdana"><b>Preço</b><br>
		  <input type="text" name="Preco" size="10" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" value="<%= preco %>"><br>
		  <b>Peso</b><br>
		  <input type="text" name="Peso" size="10" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" value="<%= peso %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 1</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto1" size="20" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25" value="<%= foto1 %>"><br>
		  <b>Foto 2</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto2" size="20" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25" value="<%= foto2 %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 3</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto3" size="20" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25" value="<%= foto3 %>"><br>
		  <b>Foto 4</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto4" size="20" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25" value="<%= foto4 %>"></font></td>
		  <td align="center"><font size="1" face="Verdana"><b>Vitrine<br>
<% If (rsprodutos("vitrine") = "S") Then %>
		  <input type="checkbox" name="Vitrine" value="S" checked>
<% Else %>
		  <input type="checkbox" name="Vitrine" value="S">
<% End If %>
		  <br>SubViTrine<br>
<% If (rsprodutos("subvitrine") = "S") Then %>
		  <input type="checkbox" name="SubVitrine" value="S" checked>
<% Else %>
		  <input type="checkbox" name="SubVitrine" value="S">
<% End If %>
		  </b></font></td>
		  <td align="center"><font size="1" face="Verdana"><b>Promoção<br>
<% If (rsprodutos("promocao") = "S") Then %>
		  <input type="checkbox" name="Promocao" value="S" checked>
<% Else %>
		  <input type="checkbox" name="Promocao" value="S">
<% End If %>
		  <br>Ativo<br>
<% If (rsprodutos("ativo") = "S") Then %>
		  <input type="checkbox" name="Ativo" value="S" checked>
<% Else %>
		  <input type="checkbox" name="Ativo" value="S">
<% End If %>
		  </b></font></td>
		</tr>
		<tr>
		  <td colspan="2"><b><font face="Verdana" size="1">Dt.Cadastro</font></b><font size="1" face="Verdana">
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="10" --><input type="text" name="DtCadastro" size="12" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" onKeyPress="ajustar_data(this)" maxlength="10" value="<%= dtcadastro %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 5</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto5" size="20" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25" value="<%= foto5 %>"></font></td>
		  <td align="center" colspan="2"><input type="hidden" name="cod" value="<%= rsProdutos("CodProduto") %>">
		  <input type="submit" value="Alterar" name="Acao"></td>
		</tr>
	  </table>
	  </td>
	</tr>
<%  rsProdutos.Close
  Case "del"
	SQL = "SELECT * FROM Produtos WHERE CodProduto = " & Request.QueryString("cod")
	rsProdutos.Open SQL, Conexao
	
	descricao = rsProdutos("Descricao")
	If (descricao <> "") Then
	  descricao = Replace(descricao,"<br>",vbCrLf)
	End If
	minidescricao = rsProdutos("MiniDescricao")
	If (minidescricao <> "") Then
	  minidescricao = Replace(minidescricao,"<br>",vbCrLf)
	End If
	preco = rsProdutos("Preco")
	peso = FormatNumber(rsProdutos("Peso"),2)
	foto1 = rsProdutos("Foto1")
	foto2 = rsProdutos("Foto2")
	foto3 = rsProdutos("Foto3")
	foto4 = rsProdutos("Foto4")
	foto5 = rsProdutos("Foto5")
	dtcadastro = rsProdutos("DtCadastro")
%>
	<tr>
	  <td>
	  <table border="0" cellspacing="0" width="100%" id="AutoNumber2" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2">
		<tr>
		  <td><b><font face="Verdana" size="1">Código</font></b><font size="1" face="Verdana"><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="50" --><input type="text" name="Codigo" size="15" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" maxlength="50" value="<%= rsProdutos("Codigo") %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Produto</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="255" --><input type="text" name="Produto" size="40" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" maxlength="255" value="<%= rsProdutos("Produto") %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Categoria</b><br>
		  <select size="1" name="Categoria" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D">
<% SQL = "SELECT * FROM Categorias ORDER BY Categoria"
   rsCategorias.Open SQL, Conexao
   If Not (rsCategorias.EOF) Then
	 While Not (rsCategorias.EOF)
	   If (rsCategorias("CodCategoria") = rsProdutos("CodCategoria")) Then %>
	  <option value="<%= rsCategorias("CodCategoria") %>" selected><%= rsCategorias("Categoria") %></option>
<%	 Else %>
	  <option value="<%= rsCategorias("CodCategoria") %>"><%= rsCategorias("Categoria") %></option>
<%	   End If
	   rsCategorias.MoveNext
	 Wend
   End If
   rsCategorias.Close %>
		  </select></font></td>
		  <td><font size="1" face="Verdana"><b>SubCategoria</b><br>
		  <select size="1" name="SubCategoria" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D">
<% SQL = "SELECT * FROM Subcategorias ORDER BY SubCategoria"
   rsSubCategorias.Open SQL, Conexao
   If Not (rsSubCategorias.EOF) Then
	 While Not (rsSubCategorias.EOF)
	   If (rsSubCategorias("CodSubCategoria") = rsProdutos("CodSubCategoria")) Then %>
	  <option value="<%= rsSubCategorias("CodSubCategoria") %>" selected><%= rsSubCategorias("SubCategoria") %></option>
<%	 Else %>
	  <option value="<%= rsSubCategorias("CodSubCategoria") %>"><%= rsSubCategorias("SubCategoria") %></option>
<%	   End If
	   rsSubCategorias.MoveNext
	 Wend
   End If
   rsSubCategorias.Close %>
		  </select></font></td>
		</tr>
	  </table>
	  </td>
	</tr>
	<tr>
	  <td>
	  <table border="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber3">
		<tr>
		  <td rowspan="2"><font size="1" face="Verdana"><b>Descrição</b><br>
		  <textarea rows="5" name="Descricao" cols="50" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()"><%= descricao %></textarea></td>
		  <td rowspan="2"><font size="1" face="Verdana"><b>Mini Descrição</b><br>
		  <textarea rows="5" name="MiniDescricao" cols="40" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()"><%= minidescricao %></textarea></td>
		  <td><font size="1" face="Verdana"><b>Preço</b><br>
		  <input type="text" name="Preco" size="10" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= preco %>"><br>
		  <b>Peso</b><br>
		  <input type="text" name="Peso" size="10" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= peso %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 1</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto1" size="20" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= foto1 %>"><br>
		  <b>Foto 2</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto2" size="20" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= foto2 %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 3</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto3" size="20" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= foto3 %>"><br>
		  <b>Foto 4</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto4" size="20" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= foto4 %>"></font></td>
		  <td align="center"><font size="1" face="Verdana"><b>Vitrine<br>
<% If (rsProdutos("Vitrine") = "S") Then %>
		  <input type="checkbox" name="Vitrine" value="S" checked>
<% Else %>
		  <input type="checkbox" name="Vitrine" value="S">
<% End If %>
		  <br>SubViTrine<br>
<% If (rsProdutos("SubVitrine") = "S") Then %>
		  <input type="checkbox" name="SubVitrine" value="S" checked>
<% Else %>
		  <input type="checkbox" name="SubVitrine" value="S">
<% End If %>
		  </b></font></td>
		  <td align="center"><font size="1" face="Verdana"><b>Promoção<br>
<% If (rsProdutos("Promocao") = "S") Then %>
		  <input type="checkbox" name="Promocao" value="S" checked>
<% Else %>
		  <input type="checkbox" name="Promocao" value="S">
<% End If %>
		  <br>Ativo<br>
<% If (rsProdutos("Ativo") = "S") Then %>
		  <input type="checkbox" name="Ativo" value="S" checked>
<% Else %>
		  <input type="checkbox" name="Ativo" value="S">
<% End If %>
		  </b></font></td>
		</tr>
		<tr>
		  <td colspan="2"><b><font face="Verdana" size="1">Dt.Cadastro</font></b><font size="1" face="Verdana">
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="10" --><input type="text" name="DtCadastro" size="12" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" maxlength="10" value="<%= rsProdutos("DtCadastro") %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 5</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto5" size="20" style="font-family: Verdana; font-size: 7 pt; color:#9D9D9D" onFocus="this.blur()" value="<%= foto5 %>"></font></td>
		  <td align="center" colspan="2"><input type="hidden" name="cod" value="<%= rsProdutos("CodProduto") %>">
		  <input type="submit" value="Excluir" name="Acao"></td>
		</tr>
	  </table>
	  </td>
	</tr>
<%  rsProdutos.Close
  Case Else %>
	<tr>
	  <td>
	  <table border="0" cellspacing="0" width="100%" id="AutoNumber2" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2">
		<tr>
		  <td><b><font face="Verdana" size="1">Código</font></b><font size="1" face="Verdana"><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="50" --><input type="text" name="Codigo" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="50"></font></td>
		  <td><font size="1" face="Verdana"><b>Produto</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="255" --><input type="text" name="Produto" size="40" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="255"></font></td>
		  <td><font size="1" face="Verdana"><b>Categoria</b><br>
		  <select size="1" name="Categoria" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" onChange="redireciona(this)">
<% If (cat = "") Then %>
		  <option>Selecione</option>
<% End If
   SQL = "SELECT * FROM Categorias ORDER BY Categoria"
   rsCategorias.Open SQL, Conexao
   If Not (rsCategorias.EOF) Then
	 While Not (rsCategorias.EOF)
	   If (rsCategorias("CodCategoria") = CInt(cat)) Then %>
		  <option value="<%= rsCategorias("CodCategoria") %>" selected><%= rsCategorias("Categoria") %></option>
<%	 Else %>
		  <option value="<%= rsCategorias("CodCategoria") %>"><%= rsCategorias("Categoria") %></option>
<%	 End If
	   rsCategorias.MoveNext
	 Wend
   End If
   rsCategorias.Close %>
		  </select></font></td>
		  <td><font size="1" face="Verdana"><b>SubCategoria</b><br>
		  <select size="1" name="SubCategoria" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);">
		  <option>Selecione</option>
<% If (cat <> "") Then
	 SQL = "SELECT * FROM Subcategorias WHERE CodCategoria = " & cat & " ORDER BY SubCategoria"
	 rsSubCategorias.Open SQL, Conexao
	 If Not (rsSubCategorias.EOF) Then
	   While Not (rsSubCategorias.EOF) %>
		  <option value="<%= rsSubCategorias("CodSubCategoria") %>"><%= rsSubCategorias("SubCategoria") %></option>
<%	   rsSubCategorias.MoveNext
		 Wend
	 End If
	 rsSubCategorias.Close
   End If %>
		  </select></font></td>
		</tr>
	  </table>
	  </td>
	</tr>
	<tr>
	  <td>
	  <table border="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber3">
		<tr>
		  <td rowspan="2"><font size="1" face="Verdana"><b>Descrição</b><br>
		  <textarea rows="5" name="Descricao" cols="50" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);"><b>Descrição do Produto</b>
<b>Aplicação</b>
<b>Acompanha</b>
<b>Garantia</b>
12 Meses
<font color= "#FFFFFF">colocar possiveis erro </font color>
</textarea></td>
		  <td rowspan="2"><font size="1" face="Verdana"><b>Mini Descrição</b><br>
		  <textarea rows="5" name="MiniDescricao" cols="40" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);"></textarea></td>
		  <td><font size="1" face="Verdana"><b>Preço</b><br>
		  <input type="text" name="Preco" size="10" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);"><br>
		  <b>Peso</b><br>
		  <input type="text" name="Peso" size="10" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 1</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto1" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25"><br>
		  <b>Foto 2</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto2" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 3</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto3" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25"><br>
		  <b>Foto 4</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto4" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25"></font></td>
		  <td align="center"><font size="1" face="Verdana"><b>
		  Vitrine<br>
		  <input type="checkbox" name="Vitrine" value="S"><br>
		  SubVitrine<br>
		  <input type="checkbox" name="SubVitrine" value="S"></b></font></td>
		  <td align="center"><font size="1" face="Verdana"><b>
		  Promoção<br>
		  <input type="checkbox" name="Promocao" value="S"><br>
		  Ativo<br>
		  <input type="checkbox" name="Ativo" value="S" checked></b></font></td>
		</tr>
		<tr>
		  <td colspan="2"><b><font face="Verdana" size="1">Dt.Cadastro</font></b><font size="1" face="Verdana">
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="10" --><input type="text" name="DtCadastro" size="12" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" onKeyPress="ajustar_data(this)" maxlength="10" value="<%= date %>"></font></td>
		  <td><font size="1" face="Verdana"><b>Foto 5</b><br>
		  <!--webbot bot="Validation" b-value-required="TRUE" i-maximum-length="25" --><input type="text" name="Foto5" size="15" style="font-family: Verdana; font-size: 7 pt" onBlur="desativa_campo(this);" onFocus="ativa_campo(this);" maxlength="25"></font></td>
		  <td align="center" colspan="2"><input type="submit" value="Cadastrar" name="Acao"></td>
		</tr>
	  </table>
	  </td>
	</tr>
<%
End Select %>
	</table>
	</td>
  </tr>
</table>
</form>

</body>

</html>

<%
Set rsProdutos = Nothing
Set rsSubCategorias = Nothing
Set rsCategorias = Nothing
Fecha_Conexao
%>

 

se puderem me ajudar

 

Vlw.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Existe mesmo esse cod_comercial na tabela?

 

Dê uma olhada no HTML que é gerado, se não apareceu alguma mensagem de erro.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.