I have a button that when clicked opens up the users mail program via use of mailto: and allows them to send a link via an email.
I realise that there are some browser issues with using mailto; but am not overly concerened with this as for 99% of users it will work. ( I intend to implement a more concrete solution as and when time permits, but it'll do for now )
Anyhow, my problem is this, when a user clicks on < a href=mailto:etc etc>button here</a> I would like to know that they have done so, so I can greater evaluate its perceived use and take up.
It looks like Google tracks clicks via the use of this construct:
<a href=url onmousedown="return clk(1,this)">url</a> using the following javascript.
<script>
<!--
function clk(n,el)
{if(document.images)
{(new Image()).src="/url?sa=T&start="+n+"&url="+escape(el.href);
}return true;
}
//-->
</script>
I am assuming that this registers the click and sends them on their way.
I'd like to do something similar but without reloading the page or sending them on anywhere.
I thought about opening a new window and activating the necessaries from there using php and javascript eg open a window, pass the variables, register the click in a text file or DB, activate the mailto, close the window, but am not happy with such an approach as 1. it seems very cumbersome and 2. I'm hopeful that there's a simpler solution.
If anyone has any ideas I'd be obliged.
Cheers









