For some reason it does not work. The error message I get is: s.split is not a function 

Thank you all for your comments so far.

Yes, you are right. I AM missing a dot there. But that is not the problem. Good eye.

I am pretty sure we can use regular expressions.(
The script you wrote works fine.

I also fixed my own code (with a little help from a frined).
We added a space at the end of the url, when assigning to a var and it worked.

var current_url = document.location;
chaged to
var current_url = document.location + ” “;

Now I wonder why? Any thoughts on that?

Be Positive


why not try what i said?
both document.location.href and document.location.toString() works
will convert document.location “toString()” automaticly