Safari ignores the a href link. Other browsers pass the countClicks function AND pass the link to open the new browser window. Any suggestions?
The JavaScript source is as follows:
<script language="JavaScript" type="text/JavaScript">
function countClicks(enterprise_code,sid_code,buspart_id,prod_id,server_name,path_info,query_string)
{
window.location.href = "/sharedInc/cf/polTrack.cfm?Buspart_id=" + buspart_id + "&Enterprise_Code=" + enterprise_code + "&Sid_Code=" + sid_code + "&Prod_id=" + prod_id + "&Server_Name=" + server_name + "&Path_Info=" + path_info + "&Query_String=" + query_string;
}
</script>
Whereas the HTML markup is:
<a href="http://www.polclients.com" target="_blank" onclick="countClicks('POL','POL',6808,387,'www.princetonol.com','/index.cfm','x=x&at=no')">Link</a>
Try with either
document.location.hrefor justlocation.href.Hey there. Your code should work. Well i tried this simple example on Safari browser and it works good. Try yourself.
Anchor Property : FYI : I have used
window.openPassing variables from function