Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Boa tarde
Eu peguei um script onde posso fazer um calculo de frete pelo site do correios.
Só que não consigo fazer funcionar.
Quando mando calcular, ele entra no webservice do correrios e não na pagina respostacorrerios.asp.
Segue o arquivo
calculo.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<html>
<head>
</head>
<%
If Request("busca") = 1 Then
Dim UrlResposta
'---------------- AQUI A SUA URL DE RESPOSTA ----------------------
UrlResposta = "http://www.portalogika.com.br/respostacorreios.asp"
'------------------------------------------------------------------
'---------------- URL DOS CORREIOS, enviando as querys para o site do correios ----------------------
Response.Redirect("http://www.correios.com.br/encomendas/precos/calculo.cfm?cepOrigem=" & Request("cepOrigem") & "&cepDestino=" & Request("cepDestino") & "&peso=" & Request("peso") & "&resposta=" & UrlResposta & "")
End If
%>
<body>
<form method="get" name="form1" id="Form1" action="<% Response.Write(Request.ServerVariables("SCRIPT_NAME")) %>">
<input type="hidden" name="cepOrigem" value="40335620" id="Hidden1">
<input type="hidden" name="busca" value="1" id="Hidden3">
<table width="400" id="Table1">
<tr>
<td width="131"> </td>
<td width="257"> </td>
</tr><tr>
<td>Cep de Destino:</td>
<td><input type="text" name="cepDestino" value="" id="Text1"></td>
</tr><tr>
<td>Peso:</td>
<td><input type="text" name="peso" value="0.300" id="Text2"></td>
</tr><tr>
<td> </td>
<td><input type="submit" name="Submit" value="Calcular" id="Submit1"></td>
</tr>
</table>
</form>
</body>
</html>
respostacorreios.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
</head>
<body>
<style type="text/css">.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}</style>
<span class="style1">Response.Write("<strong>CEP de Origem :</strong> "&Request.QueryString("cepOrigem")&"<br>")
Response.Write("<strong>CEP de Destino :</strong> "&Request.QueryString("cepDestino")&"<br><br>")
Response.Write("<strong>Peso :</strong> "&Request.QueryString("Peso")&"<br>")
Response.Write("<strong>Serviço :</strong> "&Request.QueryString("Servico")&"<br>")
Response.Write("<strong>Tarifa :</strong> "&Request.QueryString("Tarifa")&"<br><br>")
Response.Write("<strong>UF de Origem :</strong> "&Request.QueryString("UFOrigem")&"<br>")
Response.Write("<strong>UF de Destino :</strong> "&Request.QueryString("UFdestino")&"/"&Request.QueryString("LocalDestino")&"<br>")</span>
</body>
</html>
POR FAVOR SE PUDEREM ME AJUDAR FICAREI MUITO AGRADECIDO!!!!
Muito obrigado
Carregando comentários...