problem with firefox 31 as javascript submit is not working. The problem occurs on the product page, because after selecting the product it does not move to the cart page or the wish list page. I tested it on other browsers, as well as on firefox 30, and it works fine on them. I also tried to disable other plugins, but it did not work. I am debugging the code snippet below, and its variable gets the desired values according to the logic, for example, it enters another only when the user has checked the field. I will be grateful for any quick solutions.
echo "<input class=\"button wish_btn_style\" type=\"submit\" value=\"Add to
wishlist\" onclick=\"return changelocation('wishlist.php')\">";
echo "<input class=\"button cart_btn_style\" type=\"submit\" value=\"Add to cart\"
onclick=\"return changelocation('cart.php')\">";
function changelocation(action)
{var canigo=0;
var x=document.getElementById('txt_quent').value;
var status;
if((x=="") || isNaN(x))
{
alert("Please enter quantity only in number");
var canigo=1;
return false;
}
if(canigo==0)
{status=$('input:radio[name="subid"]:checked').val();
if(isNaN(status))
{
alert('Please select the desired product specification');
return false;
}
else
{
document.getElementById('product').action=action;
document.getElementById('product').target='_self';
document.getElementById('product').submit();
return true;
}
}
}
source
share