So I'm gettin this error and have no idea why:
jQuery.ajax Uncaught SyntaxError: Unexpected identifier
I am trying to parse some information about a customer to another file that is in the main directory of the FTP-Server called "pricealarm.php"
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#pricealarm-fakeSubmit").click(function(){
if (jQuery('input[name="pa[offer]"]').val().length > 0 && jQuery('input[name="pa[email]"').val().length > 0 && jQuery('input[name="pa[name]"').val().length > 0 && jQuery('input[name="c_mac"]').val().length > 2 ) {
//Parsing der Eingegebenen Information in die Datenbank (eigentliches Prozedere in pricealarm.php)
var parse = {
currency: jQuery('input[name="pa[currency]"]').val(),
price: jQuery('input[name="pa[price]"]').val(),
offer: jQuery('input[name="pa[offer]"]').val(),
email: jQuery('input[name="pa[email]"]').val(),
phone: jQuery('input[name="pa[phone]"]').val(),
name: jQuery('input[name="pa[name]"]').val(),
product: jQuery('input[name="pa[product]"]').val(),
variant: jQuery('input[name="pa[variant]"]').val(),
productID: jQuery('input[name="pa[productID]"]').val(),
oxArtID: jQuery('input[name="pa[oxArtID]"]').val(),
shopID: jQuery('input[name="pa[shopID]"]').val()
};
jQuery.ajax(
{
type: 'POST',
url: 'pricealarm.php',
data: parse,
success: function() {console.info(parse) },
error: function() {console.info('pricealarm couldnt parse the data')}
});
return false;
}
else{
jQuery('#pricealarm-fakeSubmit')after('<span class="js-oxError_notEmpty">[{ oxmultilang ident="ERROR_MESSAGE_INPUT_NOTALLFIELDS" }]</span>');
}
});
});
</script>
EDIT: Updated code to fit suggestions. Still not working yet EDIT2: found the error x.x