Qdo o cliente acaba de fazer suas compras, um email (o deste formulario) é enviado à loja com os dados do pedido do cara ... mas , tem um porém ....
este form utiliza o mailto: ..... e isso quebra as pernas né ...
alguem sabe como faço para tirar o mailto: e direciona-lo para o formmail.php do meu servidor ?
Grato !
}
function submitform() {
if (
!document.form1.Email.value.length
|| !document.form1.otherinfo.value.length
) {
alert("You have not completed all required fields:\n" +
"Please complete all Fields marked with an asterisk\n" +
"in the Customer Information section");
document.form1.Names.focus();
return false;
}
var e_mail= 'mailto:edson83@pop.com.br?subject=Order&body='
index=0;
for (i =1;i < parent.item_num;i++)
{ if(parent.itemlist[i].quan > 0)
{
index = index + 1;
e_mail= (e_mail + 'Item - Code: ' + parent.itemlist[i].code + ' - UnitPrice ' + '$' + parent.itemlist[i].price + ' - Detail: ' + ReplaceDesc® + ' - Quantity: ' + parent.itemlist[i].quan + '%0A%0D');
}
}
e_mail= (e_mail + 'Quote Total: ' + '$' + format(parent.all_order_totals(),2) + '%0A%0D');
e_mail= (e_mail +'Names: '+ document.form1.Names.value + '%0A%0D');
e_mail= (e_mail +'Email: '+ document.form1.Email.value + '%0A%0D');
e_mail= (e_mail +'comments: '+ document.form1.comments.value + '%0A%0D');
if (document.form1.subscribe.checked){
e_mail= (e_mail +'subscribe: '+ document.form1.subscribe.value + '%0A%0D');
}
e_mail= (e_mail +'otherinfo: '+ document.form1.otherinfo.value + '%0A%0D');
document.location=e_mail;
alert('Thankyou for your order');
return true;
}
function ShowItems()
{
index=0;
for (i =1;i < parent.item_num;i++)
{ if(parent.itemlist[i].quan > 0)
{
index = index + 1;
document.write('<tr><td class="order" align="center"<a href=' + parent.itemlist[i].url + '></a>' + parent.itemlist[i].code +' </td><td align="center">$'+ parent.itemlist[i].price +' </td><td align="center">'+ ReplaceDesc® +'</td><td align="center">'+ parent.itemlist[i].quan +'</td></tr>');
document.write('<input type="hidden" readonly="yes" name="Item" value=" Code: ' + parent.itemlist[i].code + ' - UnitPrice $' + parent.itemlist[i].price + ' - Detail: ' + ReplaceDesc® + ' - Quantity: ' + parent.itemlist[i].quan + '">');
}
}
document.write('<tr><td class="footer" align="right" colspan="3" ><b>Quote Total :</b></td><td class="footer" align="right"><input class="info" type=text readonly="yes" name=total size=15 value=$'+ format(parent.all_order_totals(),2) + '></td></tr></table><br>');
document.write('<table border="1" cellpadding="0" align="center" cellspacing="0" bgcolor="#ffffcc" width="500">');
document.write('<tr><td align="center">');
}
<!-- end hiding -->
</SCRIPT>
<TABLE WIDTH="100%" VALIGN="top" ALIGN="center">
<TR>
<TD>
<FORM name="form1"">
<script LANGUAGE="javascript">
<!-- hide from Browsers
document.write('<table width="100%" valign="top" align="center" border="1" cellspacing="0"><tr><th class="order" width="10%">Código</th><th class="order" width="10%">Preço</th><th class="order" width="70%">Produtos</th><th class="order" width="10%">Quantidade</th></tr>');
index=0;
for (i =1;i < parent.item_num;i++)
{ if(parent.itemlist[i].quan > 0)
{
index = index + 1;
document.write('<tr><td class="order" align="center"<a href=' + parent.itemlist[i].url + '></a>' + parent.itemlist[i].code +' </td><td class="order" align="center">'+ 'R$' + parent.itemlist[i].price +' </td><td class="order" align="center">'+ ReplaceDesc® +'</td><td class="order" align="center">'+ parent.itemlist[i].quan +'</td></tr>');
document.write('<input type="hidden" readonly="yes" name="Item" value=" Code: ' + parent.itemlist[i].code + ' - UnitPrice $' + '$' + parent.itemlist[i].price + ' - Detail: ' + ReplaceDesc® + ' - Quantity: ' + parent.itemlist[i].quan + '">');
}
}
document.write('<tr><td class="footer" align="right" colspan="3" ><b>Valor total :</b></td><td class="footer" align="right"><input class="info" type=text readonly="yes" name=total size=15 value='+ 'R$' + format(parent.all_order_totals(),2) + '></td></tr></table><br>');
<!-- end hiding -->
</SCRIPT>
<TABLE BORDER="1" CELLPADDING="0" ALIGN="center" CELLSPACING="0"
BGCOLOR="#ffffcc" WIDTH="500">
<TR>
<TD ALIGN="center">
<TABLE BORDER="0" CELLPADDING="2" ALIGN="center" CELLSPACING="0" WIDTH="100%">
<TR>
<TH CLASS="order" COLSPAN="4" ALIGN="center" WIDTH="492"><B>Suas
informações </B></TH>
</TR>
<TR>
<TD ALIGN="LEFT" COLSPAN="4" WIDTH="318" HEIGHT="8"></TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><B>*Nome Completo:</B></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<INPUT CLASS="info" TYPE="text" SIZE="30" NAME="Names">
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><b>*Telefone:</b></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<input class="info" type="text" size="30" name="Names2">
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><b>*Endereço:</b></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<input class="info" type="text" size="30" name="Names22">
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><b>*Cidade e Estado:</b></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<input class="info" type="text" size="15" name="Names222">
<input class="info" type="text" size="5" name="Names2222">
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><b>*Cep:</b></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<input class="info" type="text" size="15" name="Names2223">
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><B>*E-mail:</B></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<INPUT CLASS="info" TYPE="text" SIZE="30" NAME="Email">
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%" VALIGN="TOP"><B>Comentários:</B></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<TEXTAREA CLASS="info" NAME="comments" ROWS="3" COLS="29"></TEXTAREA>
</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<INPUT TYPE="checkbox" NAME="subscribe">
Quero receber novidades via e-mail</TD>
</TR>
<TR>
<TD ALIGN="right" WIDTH="35%"><B>Outras informações:</B></TD>
<TD ALIGN="left" COLSPAN="3" WIDTH="318">
<INPUT CLASS="info" TYPE="text" SIZE="40" NAME="otherinfo">
</TD>
</TR>
<TR>
<TD ALIGN="center" COLSPAN="4" WIDTH="492">Os campos com
* são obrigatórios</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD ALIGN="CENTER"> <TABLE BORDER="0" CELLSPACING="0" ALIGN="center">
<TR>
<TD ALIGN="center">
<input type="button" value="Enviar" onClick="java script:submitform()">
<IMG ALT=""
SRC="icon/1pix.gif" HEIGHT="1" WIDTH="4"><INPUT TYPE="reset" NAME="reset"
ONCLICK="this.blur()"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
<BR>
<TABLE BORDER="0" CELLSPACING="0" ALIGN="center">
<TR>
<TD ALIGN="center"><A HREF="java script:parent.history.back()"
ONCLICK="this.blur()"><IMG SRC="icon/bback.gif" BORDER="0" WIDTH="49"
HEIGHT="19"></A><IMG ALT="" SRC="icon/1pix.gif" HEIGHT="1" WIDTH="4"><A
HREF="java script:window.print()" ONCLICK="this.blur()"><IMG ALT=""
SRC="icon/bprint.gif" BORDER="0" WIDTH="49" HEIGHT="19"></A></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>