I am trying the impossible I guess. I have this: if(location.protocol.toLowerCase() =='http:' &&
location.href.toLowerCase().indexOf('ctl/Register') > -1 ))
location.href = location.href.replace('http:','https:'); if(location.protocol.toLowerCase() =='https:' &&
location.href.toLowerCase().indexOf('ctl/Register') == -1 )
location.href = location.href.replace('https:','http:'); I want every tab with ctl/register to switch to SSL and back if it does not contain that control but it does not work...why is that? |