Full Code Here: http://pastebin.com/qQpsTjsR
I've been trying to submit a post form to send off an email; I've gotten the form to save something to the localstorage for the browser. However now I've had to simulate a submit with the action changed in the javascript; which when called seems to simple give me the Syntax Exception, at line 1, even though there's no javascript at line 1? I've checked in the inspect menu and the brackets seem to be fine. I've also ran it though JSLint, hence the 'use strict' statements littered around.
I cant seem to pinpoint the issue; which is bothering me...A second pair fo eyes would be great to find the issue; or perhaps it's something I didn't know before? (Pretty new to Javascript in terms of debugging..)
This is the Javascript embeded, but at the top of the file you'll find the full file:
function showForms() {
'use strict';
$('.primaryForm').fadeIn(700);
}
function submitForm() {
'use strict';
SetItem('username', $('#username').val());
$('.primaryForm').action = "download.php";
$('.primaryForm').submit();
}
function intro2TypeWrite() {
'use strict';
$('.intro2').typewrite().delay(8750).fadeOut(700);
setTimeout(showForms, 9450);
}
function intro2Show() {
'use strict';
$('.intro').delay(5000).fadeOut(700);
setTimeout(intro2TypeWrite, 5700);
}
$(document).ready(function () {
'use strict';
$('.intro').typewrite({
'callback': intro2Show()
});
});