For example if
location.href = 'http://mydomain.com/en/'
and I have
<a href="my-file.html" id="myId">i am just a link</a>
so
href = $('a#id').attr('href');
for some reason Firefox, Chrome and Opera return: my-file.html
but IE7 will return: http://mydomain.com/en/my-file.html
I tried this function with the domain-name but gives an error:
function str_replace(busca, repla, orig)
{
str = new String(orig);
rExp = "/"+busca+"/g";
rExp = eval(rExp);
newS = String(repla);
str = new String(str.replace(rExp, newS));
return str;
}
domain-name is not defined
[Detener en este error] rExp = eval(rExp);
Any ideas for how to prevent it???
Try following :
Hope it helps