I need some help. I am trying to figure out how to create a function that has an onclick that when the link is clicked, the function will load an image. This is basically a tracking pixel for third party tracking. Its a request from the client.
The code that the onclick will go on is below:
HTML Code:
<a href="tel://1-888-123-4563" onClick="load(''); return false;" class="link">Call (888) 123-4563Now To Order<sup>†</sup></a>
thanks for the help.
07-17-2012, 12:57 PM
toicontien
You can create an image and append it to the document:
Code:
function load(url) {
if (!load.images) {
load.images = document.createElement("div");
load.images.style.display = "none";
document.body.appendChild(load.images);
}