I'm breaking my head to try to solve this problem, but without success ...
I have a virtual store created for another programmer who disappeared. To vary code is undocumented.
To calculate the freight in the shopping cart it calls another asp file which in turn calls the webservice of the post office and returns the value in post to the shopping cart. This value is then loaded into a session variable.
Freight calculation form within the shopping cart:
<form method=post action=calcula_cep.asp>
<input name="met" id="met1" type="radio" value="PAC" />PAC (até 10 dias úteis)
<input name="met" id="met2" type="radio" value="SEDEX" />SEDEX (até 4 dias úteis)
<input type=hidden name=peso value="<%=session("total_peso")%>">
<input type=text name="cep_1" id="cep_1" size=5 onkeyup="pulaCampo();" maxlength="5" class=campo value="<%=cepp1%>" readonly="readonly">-<input type=text name="cep_2" id="cep_2" size=3 maxlength="3" class=campo value="<%=cepp2%>" readonly="readonly">
<input type=submit name=submit value="Calcular" class="botao">
</form>
The file calcula_cep.asp calls the webservice of the mails and returns the variable Value_1 per post for the shopping cart:
if len(request("Valor_1")) > 0 then
if len(session("log_cli"))>0 then
Session("vTarifa") = Replace(request("Valor_1"),".",",")
else
Session("sTarifa") = replace(request("Valor_1"),".",",")
end if
end if
What I am trying to do is an ajax request for calcula_cep.asp to update the value of Session ("vTarifa") and Session ("sTarifa"). My question is how to update the session and how to print this updated value in the cart, without updating the page (by javascript?).