I am getting syntax errors when defining variables and I cant figure out why. I am extremely new to coding so any help is appreciated.
<script type="text/javascript">
jQuery("#submitSample").click(function(){
var fullName = jQuery("#fullName" ).val();
var eMail = jQuery("#eMail" ).val();
var mailingAddress = jQuery("#mailingAddress" ).val();
var specialRequests = jQuery("#specialRequests").val();
var inkOne = jQuery("#inkOne" ).val();
var inkTwo = jQuery("#inkTwo" ).val();
var inkThree = jQuery("#inkThree" ).val();
var inkFour = jQuery("#inkFour" ).val();
var designOne = jQuery("#designOne" ).val();
var designTwo = jQuery("#designTwo" ).val();
var designThree = jQuery("#designThree" ).val();
data = "fullName=" + fullName +
"&eMail=" + eMail +
"&mailingAddress=" + mailingAddress +
"&specialRequests=" + specialRequests +
"&inkOne=" + inkOne +
"&inkTwo=" + inkTwo +
"&inkThree=" + inkThree +
"&inkFour=" + inkFour +
"&designOne=" + designOne +
"&designTwo=" + designTwo +
"&designThree=" + designThree;
jQuery.ajax({ type: "POST",
url: "http://www.famousartistprints.com/sample_form.php",
data: data,
success: function() {
jQuery("#couturePaypal").click();
}
});
});
</script>
I opened it in Chrome and this is what I got, I am not sure what it means.
SyntaxError: Unexpected token <
arguments: Array[1]
0: "<"
length: 1
__proto__: Array[0]
get message: function () { [native code] }
get stack: function () { [native code] }
set message: function () { [native code] }
set stack: function () { [native code] }
type: "unexpected_token"
__proto__: Error
I figured it out, In Dreamweaver having the “script” tag automatically gives a syntax error. I feel dumb :(. Thanks for all the comments and help!