Hi
I am using some JavaScript redirection code (You can find the code bellow) for my website
Some months before everything was all right. But I don’t know what happened now
The code is not working
Can anyone help me – I am very new to javascript
Thanks
I am using some JavaScript redirection code (You can find the code bellow) for my website
Some months before everything was all right. But I don’t know what happened now
The code is not working
Can anyone help me – I am very new to javascript
Thanks
Code:
<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script> <script language="JavaScript1.2"><!-- // The following only works in JavaScript 1.2 or greater: function showbelgium() { top.location.href = 'http://www.example.com/en/belgium.html'; } function showluxembourg() { top.location.href = 'http://www.example.com/en/luxembourg.html'; } function showmorocco() { top.location.href = 'http://www.example.com/en/morocco.html'; } function shownetherlands() { top.location.href = 'http://www.example.com/en/thenetherlands.html'; } function showsingapore() { top.location.href = 'http://www.example.com/en/singapore.html'; } function showuk() { top.location.href = 'http://www.example.com/en/uk.html'; } function showus() { top.location.href = ' http://www.example.com/en/usa.html'; } function showrestofworld() { top.location.href = 'http://www.example.com/en' } var language = geoip_country_code(); var code = language.substring(0,2); if(code == 'BE') showbelgium(); else if(code == 'LU') showluxembourg(); else if(code == 'MA') showmorocco(); else if(code == 'NL') shownetherlands(); else if(code == 'SG') showsingapore(); else if(code == 'GB') showuk(); else if(code == 'US') showus(); else showrestofworld(); </script>
Comment