Ir para conteúdo

POWERED BY:

Arquivado

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

Carlos Moreira

Dando erro e nao encontro ele!

Recommended Posts

Olá pessoal!

 

Pessoal ocorreo seguinte eu tenho uma lojinha simples onde o kra escolhe o produto que coloca no carrinho.

 

Eu estou colocando um esquema de cor agora no produto, onde a pessoa escolha a cor de sejada do produto.

 

Mas ta dando um erro que nao to conseguindo encontrá-lo

 

TESTEM assim:

 

1° passo=coloque qualquer quantidade no 1° produto da lista e adicione ao carrinho

 

2° passo= clique em Comprar Mais

 

3° passo= escolha a categoria Toalhas de Mesa

 

4° passo= Adicione o 2° produto da lista ai verão o erro

 

OBS: Deu esse erro depois que eu coloque o código das cores que eu pego separados por ","

 

Vejam: http://www.laboratorionet.com/teste/produt...sp?categoria1=1

Compartilhar este post


Link para o post
Compartilhar em outros sites

isso é erro de javascript, verifique as validações do seu formulário e se a função foi aplicada corretamente. Caso o erro persista a solução você tenta no forum de javascript

Compartilhar este post


Link para o post
Compartilhar em outros sites
<!--#include file="config.asp" --><%categoria1 = Request.QueryString("categoria1") pag = Request.QueryString("pag") 'página atualCall abre_conexao(ConnString,Conn)Set RS = Server.CreateObject("ADODB.Recordset") msql = "SELECT * FROM produtos where categoria1 = "& categoria1 & " and aprovado <> 0 order by id desc"Set RS.activeconnection = Conn 'Verifica se tem registro, se nao tiver exibe que não temRS.Open msql, Conn,3,3%>				  <table width="100%" height="50" border="0" cellpadding="3" cellspacing="1">					<tr> 					  <td class="tituloform"><span class="titulo1"><strong>PRODUTOS</strong></span><strong> 						<span class="texto"> » 						<%Set RScateg = Server.CreateObject("ADODB.Recordset") msql = "SELECT * FROM categorias1 where id="&categoria1&""Set RScateg.activeconnection = Conn 'Verifica se tem registro, se nao tiver exibe que não temRScateg.Open msql, Conn,3,3do until RScateg.eof%>						<%= RScateg("categoria1")%> 						<% RScateg.movenextloopRScateg.Close Set RScateg = Nothing%>						</span></strong></td>					</tr>				  </table>				  <table width="100%" border="0" cellspacing="0" cellpadding="0">					<tr> 					  <td><div align="center"><span class="style11"> <%If RS.eof or RS.bof then%>						  </span><span class="texto">Nenhum cadastro na categoria 						  <strong> 						  <%Set RScateg = Server.CreateObject("ADODB.Recordset") msql = "SELECT * FROM categorias1 where id="&categoria1&""Set RScateg.activeconnection = Conn 'Verifica se tem registro, se nao tiver exibe que não temRScateg.Open msql, Conn,3,3do until RScateg.eof%>						  <%= RScateg("categoria1")%> 						  <% RScateg.movenextloopRScateg.Close Set RScateg = Nothing%>						  </strong> no momento</span></div></td>					</tr>					<tr> 					  <td align="center" class="texto">Escolha uma categoria para 						vizualizar o produto: 						<!--#include file="includes/menulist.asp" --> </td>					</tr>					<tr> 					  <td><div align="center"><a href="java script:history.go(-1)" class="texto">« 						  Voltar para página anterior</a><span class="style11"> 						  <%else%>						  </span></div></td>					</tr>				  </table>				  <%Response.CacheControl="no-cache"Response.AddHeader "Pragma","no-cache"Response.Expires=0%>				  <%count=0%><script>function addtocart(formele,prodid){dml=document.f1;dml2=document.f2;product=dml.elements[formele];total=dml2.elements[0]; if(isNaN(product.value) || product.value=="" || product.value=="0")	 { 	  alert("Preencha a quantidade do Produto");	  product.value="";	  product.focus();	  //return false;	 } else{	  	  total.value=prodid +","+Math.ceil(product.value);	  dml2.submit();	  }//return true;}  function removecart(removeprod){    location.href="submitshop.asp?choice=remove&removeprod="+removeprod      }</script><!--#include file="includes/funcaoonmouse.asp" -->				  <table width="500" height="30" border="0" align="center" cellpadding="0" cellspacing="0">					<tr> 					  <td align="right" class="texto"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="texto">						  <tr> 							<td width="409" align="right">Outras Categorias dos 							  Produtos:</td>							<td><!--#include file="includes/menulist.asp" --></td>						  </tr>						</table></td>					</tr>				  </table>				  <table width="500" height="30" border="0" align="center" cellpadding="0" cellspacing="0">					<tr> 					  <td align="center" class="texto"> <%'Páginaçãopagina= "produtos.asp" 'Nome da páginaConst NumPorPage = 10Dim pagIF Request.QueryString("pag") = "" Thenpag = 1 'Primeira páginaElsepag = Request.QueryString("pag")End IfRS.CacheSize = NumPorPage 'Define o tamanho do Cache = para o número de registrosRS.MoveFirst 'Move o RecorSet para o início RS.PageSize = NumPorPage 'Coloca a quantidade de páginasDim TotalPages 'Pega o número total de páginasTotalPages = RS.PageCountRS.AbsolutePage = pag 'Configura a página atual'Páginação fimCount = 0 'Zera o contadori = 0%>						Foram encontrados <strong><%=RS.RecordCount%> </strong>registros | Vizualizando Página 						<strong><%=pag%></strong> de <strong><%=TotalPages%></strong></td>					</tr>				  </table>				  <form action="carrinho.asp" method="post" name="f1" id="f1">					<table width="400" height="10" border="0" align="center" cellpadding="0" cellspacing="0">					  <tr> 						<td height="15" background="imagens/ponthor2.gif"><img src="imagens/x10x5.gif" width="10" height="5"></td>					  </tr>					</table>					<% DO WHILE NOT RS.EOF And Count < RS.PageSize%>					<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">					  <tr> 						<td valign="top">						  <%if RS("imagem1") <> "" then%>						  <a href="produtos.asp?categoria1=<%= RS("categoria1") %>"> 						  </a> <table width="114" height="80" border="1" cellpadding="0" cellspacing="0" bordercolor="#EBEBEB">							<tr> 							  <td><a href="#imagem" onClick="MM_openBrWindow('verproduto.asp?id=<%=RS("id")%>','Produto','scrollbars=yes,width=420,height=350')" onMouseOver="window.status='Produto Referência: <%=RS("referencia")%>'; return true;"><img src="imagens/uploads/<%=RS("imagem1")%>" alt="Ref: <%=RS("referencia")%>" width="100" height="75" hspace="5" vspace="5" border="0"/></a></td>							</tr>						  </table>						  <table width="114" border="0" cellspacing="0" cellpadding="0">							<tr> 							  <td bgcolor="#EBEBEB" class="textop"><img src="imagens/x5x5.gif" width="5" height="5"><a href="#imag" onMouseOver="window.status='Produto Referência: <%=RS("referencia")%>'; return true;" class="dcontexto">Ampliar 								Imagem <span><img src="imagens/uploads/<%=RS("imagem1")%>" height="180"></span></a></td>							</tr>						  </table>						  <a href="produtos.asp?categoria1=<%= RS("categoria1") %>"> 						  <%Else%>						  <br>						  </a> <table width="114" border="1" cellpadding="0" cellspacing="0" bordercolor="#EBEBEB">							<tr> 							  <td align="center"><a href="#imagem" onClick="MM_openBrWindow('verproduto.asp?id=<%=RS("id")%>','Produto','scrollbars=yes,width=420,height=350')" onMouseOver="window.status='Produto Referência: <%=RS("referencia")%>'; return true;"><img src="imagens/uploads/semimagem.jpg" width="100" height="75" hspace="5" vspace="5" border="0"></a></td>							</tr>						  </table>						  <a href="produtos.asp?categoria1=<%= RS("categoria1") %>"> 						  <%end if%>						  </a></td>						<td width="278" valign="top" class="texto"> <table width="100%" border="0" cellspacing="0" cellpadding="0">							<tr> 							  <td height="20" colspan="2" class="texto"><strong><%=(LEFT(RS("titulo"),30) & "")%>... <a href="#desc" onClick="MM_openBrWindow('verproduto.asp?id=<%=RS("id")%>','Produto','scrollbars=yes,width=420,height=350')" onMouseOver="window.status='Produto Referência: <%=RS("referencia")%>'; return true;" class="dcontexto">Mais</a></strong></td>							</tr>							<tr> 							  <td height="20" colspan="2"> <div class="texto"> 								  <div class="texto"><span class="texto2"><strong>Ref.</strong></span> 									<%=RS("referencia")%></div>								</div></td>							</tr>							<tr> 							  <td height="20" colspan="2" class="texto"><strong><font color="<%=Corpreco%>">R$</font></strong> 								<font color="<%=Corpreco%>"> 								<%If Session ("clienteacesso") <> "" Then%>								<%=RS("valor")%> 								<%Else%>								<a href="logar.asp">* Efetuar login</a> 								<%End If%>								</font></td>							</tr>							<tr> 							  <td height="20" colspan="2" class="texto"><%=(LEFT(RS("descricao"), 40) & "")%>...</td>							</tr>							<tr> 							  <td colspan="2" class="texto"><a href="#desc" onClick="MM_openBrWindow('verproduto.asp?id=<%=RS("id")%>','Produto','scrollbars=yes,width=420,height=350')" onMouseOver="window.status='Produto Referência: <%=RS("referencia")%>'; return true;" >Leia 								Mais</a></td>							</tr>							<tr> 							  <td width="35" height="20" valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0">								  <tr> 									<td height="20" class="texto">Qtd.</td>								  </tr>								  <tr> 									<td> <input type="text" name="product" size="3" value="1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana"></td>								  </tr>								</table></td>							  <td width="180"> <%If RS("cores") <> "" Then%><!--#include file="includes/coreslist.asp" --><%End If%> </td>							</tr>							<tr> 							  <td height="20" colspan="2"><a href="java script:addtocart(<%=count%>,<%=RS("id")%>);" onMouseOver="window.status='Adicionar no Carrinho o Produto: <%=RS("referencia")%>'; return true;" class="addpedido">ADICIONAR</a></td>							</tr>						  </table></td>					  </tr>					</table>					<table width="400" height="10" border="0" align="center" cellpadding="0" cellspacing="0">					  <tr> 						<td height="15" background="imagens/ponthor2.gif"><img src="imagens/x10x5.gif" width="10" height="5"></td>					  </tr>					</table>					<%i = i+1Count = Count + 1 RS.MoveNextLOOP%>				  </form>				  <p> 				  <form method="POST" action="submitshop.asp?choice=shop" name="f2">					<input type="hidden" name="total" size="20">				  </form>				  <table width="100%" border="0" cellspacing="0" cellpadding="0">					<tr> 					  <td height="20" align="center"> <% 'PaginaçãoResponse.Write("<B><font color="""& Cor1pag &""" size=""1"" face=""Verdana""> Página " & pag & " de " & TotalPages & " </font></B> <B><font color="""& Cor2pag &""" size=""1"" face=""Verdana"">encontradas</B></font>") %> </td>					</tr>					<tr> 					  <td height="20" align="center"> <%'Mostra os botões: Anterior e Próxima, utilizando da opção de IF IF pag > 1 THEN 'Se for a primeira Página, Mostra apenas o botões Próximo e UltimaResponse.Write("<font color="""& Cor1pag &""" size=""1"" face=""Verdana"">") Response.Write("<a href='"& pagina &"?categoria1=" & categoria1 & "&pag=" & 1 & "'>")Response.Write("« Primeira Página") Response.Write("</a></font> <font size=""1"" face=""Verdana"">|</font> ")Response.Write("<B><font color="""& Cor1pag &""" size=""1"" face=""Verdana"">") Response.Write("<a href='"& pagina &"?categoria1=" & categoria1 & "&pag=" & pag - 1 & "'>")Response.Write("Página Anterior") Response.Write("</a></font></B> <font size=""1"" face=""Verdana"">|</font> ")ElseResponse.Write("<font color="""& Cor3pag &""" size=""1"" face=""Verdana"">") Response.Write("« Primeira Página") Response.Write("</font> <font size=""1"" face=""Verdana"">|</font> ")Response.Write("<B><font color="""& Cor3pag &""" size=""1"" face=""Verdana"">") Response.Write("Página anterior") Response.Write("</font></B> <font size=""1"" face=""Verdana"">|</font> ")End If%> <%IF CInt(pag) <> CInt(TotalPages) THEN 'Se estiver na última página, mostra apenas o botões Anterior e PrimeiraResponse.Write("<a href='"& pagina &"?categoria1=" & categoria1 & "&pag=" & pag + 1 & "'>")Response.Write("<B><font color="""& Cor1pag &""" size=""1"" face=""Verdana"">")Response.Write("Próxima Página")Response.Write("</a></font></B> <font size=""1"" face=""Verdana"">|</font> ")Response.Write("<a href='"& pagina &"?categoria1=" & categoria1 & "&pag=" & TotalPages & "'>")Response.Write("<font color="""& Cor1pag &""" size=""1"" face=""Verdana"">")Response.Write("Última Página »")Response.Write("</a></font>")ElseResponse.Write("<B><font color="""& Cor3pag &""" size=""1"" face=""Verdana"">")Response.Write("Próxima Página") Response.Write("</font></B> <font size=""1"" face=""Verdana"">|</font> ")Response.Write("<font color="""& Cor3pag &""" size=""1"" face=""Verdana"">")Response.Write("Última Página »") Response.Write("</font>")End If 'Paginação fim%> </td>					</tr>					<tr> 					  <td height="20" align="center"> <% 'Numeros para ser mostradosmax_n_mostrados = 5intervalo = Int(max_n_mostrados /2)inicio = pag - intervalofinal = pag + intervaloIf CInt(inicio) <1 Then inicio = 1final = 5END IFIf CInt(final) > CInt(TotalPages) Then final = TotalPagesFor i = inicio To finalIf CInt(i)=CInt(pag) ThenResponse.Write "<font color="""& Cor1pag &""" size=""1"" face=""Verdana""><B>[ " & i & " ]</B></font> "END IFIf CInt(i) < CInt(pag) ThenResponse.Write "<font color="""& Cor1pag &""" size=""1"" face=""Verdana""><B><a href='"& pagina &"?categoria1=" & categoria1 & "&pag=" & i & "'>" & i & "</a></B></font> "END IFIf CInt(i) > CInt(pag) ThenResponse.Write "<font color="""& Cor1pag &""" size=""1"" face=""Verdana""><B><a href='"& pagina &"?categoria1=" & categoria1 & "&pag=" & i & "'>" & i & "</a></B></font> "END IFNextEnd ifRS.Close Set RS = Nothing%> </td>					</tr>				  </table>				  <table width="75" border="0" cellspacing="0" cellpadding="0">					<tr>					  <td> </td>					</tr>				  </table>

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.