Protocol detection
by Vladimir
HTML
<a href="httpq://abounwe.com">snk</a>
JavaScript
function OpenCustumLink(link) {
var w = window.open(link, 'xyz', 'status=0,toolbar=0, menubar =0, height=0, width =0, top= -10, left=-10 ');
alert(w);
if(w == null) {
//Work Fine
alert('Good!');
}
else {
w.close();
if (confirm('You Need a Custom Program. Do you want to install?')) {
window.location = 'SetupCustomProtocol.exe'; //Url for installer
}
}
}
$('a').click(function()
{
OpenCustumLink($(this).attr('href'));
return false;
});