Hello everyone. Today I'm looking for a way to insert one string within a certain point in another, to make redirects between spanish and english pages dynamic.
Let's pretend I have the following two variables:
How would I go about taking these two strings and creating the string "http://www.example.com/newdir/hello.html"?Code:var string = "http://www.example.com/hello.html"; // This would come from document.location var insert = "/newdir/"
Thanks a bunch!



Reply With Quote
Also, I'm only three years older than you.

Bookmarks