0
I’m trying to use a bcash cart code on my site, but as far as I can tell, it doesn’t work when the site uses jquery. I tried on a site with pure html and the link opened normal, but with jquery nothing happens. Anyone knows what can be?
<!-- INÍCIO DO CÓDIGO BCASH cod. produto bkp1 -->
<form action='https://www.bcash.com.br/checkout/car/' id="form_id" method='post' target='carrinho'>
<input type='hidden' value='add' name='acao'>
<input type='hidden' value='[email protected]' name='email_loja'>
<input type='hidden' value='123' name='cod_prod'>
<input type='hidden' value='nome_teste' name='nome_prod'>
<input type='hidden' value='67.90' name='valor_prod'>
<input type='hidden' value='0' name='peso_prod'>
<table border='0'><tr><td valign='middle'>
Quant.: <br /> <input type='text' maxLength='3' size='2' value='1' name='quant_prod' style='text-align:center'></td>
<td> </td><td><font size='1' color='#FF0000'>Frete Grátis</font><br />
<input type='image' src='https://www.bcash.com.br/webroot/img/banking/bt_adicionar_ao_carrinho.gif' id="enviadadoscliente" value='Adicionar ao Carrinho' alt='Adicionar ao Carrinho' border='0' align='absbottom' /></td></tr></table></form>
<!-- FIM DO CÓDIGO BCASH cod. produto bkp1 -->
I tried using the following code below in javascript to try to force the opening, but also nothing:
$(function(){
$("#enviadadoscliente").on("click", function(e) {
e.preventDefault();
$("#form_id").submit();
});
});
Thanks in advance for the help.
Where is $('shipped customer') should be $('#shipped').
– jefersondaniel
Hello jefersondaniel. Actually I actually misspelled here, but in my code it is correct, and this is not the cause. Thank you.
– madasi
But you need the event
onclick
to submit the form? Because thetype="image"
naturally acts as atype="submit"
. It makes no sense to disable the standard "Submit" feature and at the same time assign a "Submit" function".– Daniel Omine
Daniel, as I explained in the topic, the problem is that the button does not work due to Jquery. Without Jquery it works normally. But with it it doesn’t work. So I tried to use this function to see if it would work, but also without success. I just wanted to put it together on the topic to get rich, but it’s not necessarily the right way.
– madasi