JQuery Validate & Loading Tracking Image
Closed - This job posting has been filled and work has been completed.
I have a JQuery validate event on my form.
firstname: "Please specify your first name",
lastname: "Please specify your last name",
required: "Please enter your email address",
email: "Your email address must be in the format of firstname.lastname@example.org"
This works fine.
However if the form successfully validates, I want to run the following code:
var img = document.createElement("img");
var goalId = 123456;
var randomNum = new Date().getMilliseconds();
var value = 100;
var label = "label";
var url = encodeURI(location.href);
var trackUrl = "http://www.googleadservices.com/pa
img.src = trackUrl;
and I can't get it to work!! It is critical that the image loads fully before the form is actually submitted as well.